[Pkg-javascript-commits] [node-livescript] 01/05: Upstream fix a test
Jérémy Lal
kapouer at moszumanska.debian.org
Wed Jan 3 22:48:00 UTC 2018
This is an automated email from the git hooks/post-receive script.
kapouer pushed a commit to branch master
in repository node-livescript.
commit 5c342e1cb1e57f55ef1c915d7de90ff8d5930146
Author: Jérémy Lal <kapouer at melix.org>
Date: Wed Jan 3 23:40:16 2018 +0100
Upstream fix a test
---
.../46bed9ec3d67805062ab982d5ac0b918710e5ac3.patch | 40 ++++++++++++++++++++++
1 file changed, 40 insertions(+)
diff --git a/debian/patches/46bed9ec3d67805062ab982d5ac0b918710e5ac3.patch b/debian/patches/46bed9ec3d67805062ab982d5ac0b918710e5ac3.patch
new file mode 100644
index 0000000..35c01e2
--- /dev/null
+++ b/debian/patches/46bed9ec3d67805062ab982d5ac0b918710e5ac3.patch
@@ -0,0 +1,40 @@
+From 46bed9ec3d67805062ab982d5ac0b918710e5ac3 Mon Sep 17 00:00:00 2001
+From: Ryan Hendrickson <ryan.hendrickson at alum.mit.edu>
+Date: Tue, 24 Jan 2017 21:12:57 -0500
+Subject: [PATCH] fix gkz/LiveScript#946
+
+---
+ test/regex.ls | 23 ++++++++++++++++++++---
+ 1 file changed, 20 insertions(+), 3 deletions(-)
+
+diff --git a/test/regex.ls b/test/regex.ls
+index 20d8804d..8f8acf76 100644
+--- a/test/regex.ls
++++ b/test/regex.ls
+@@ -94,6 +94,23 @@ eq \string typeof /^$/$
+ eq \string typeof //^$//$
+ eq \string typeof //^#{''}$//$
+
+-eq /\\\//$ /\\\//source
+-eq //\\\///$ //\\\///source
+-eq //#{\\}\///$ //#{\\}\///source
++# [gkz/LiveScript#946](https://github.com/gkz/LiveScript/issues/946)
++# It's almost, but not quite true, that $ is equivalent to a more efficient
++# .source. What $ actually does is return the string that LiveScript would be
++# passing to the RegExp constructor, were the $ flag absent. There are some cases
++# where a LiveScript regular expression literal can correspond to a source string
++# that is not as fully escaped as a standards-compliant implementation of .source
++# would produce, yet is close enough to feed to RegExp anyway. In such cases,
++# the $-flagged expression will be different than the result of .source. (The
++# third test case below is such an example.) Note also that the implementation
++# of .source may vary based on the JS engine this test is running on; earlier
++# versions of Node.js would return .source strings with less escaping than modern
++# engines. For these reasons, it's important to always compare a .source with
++# another .source in these tests, instead of comparing the $-flagged expression
++# to .source as previous versions of these tests did.
++
++source-eq = (s, r) -> eq new RegExp(s).source, r.source
++
++source-eq /\\\//$ /\\\//
++source-eq //\\\///$ //\\\///
++source-eq //#{\\}\///$ //#{\\}\///
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-javascript/node-livescript.git
More information about the Pkg-javascript-commits
mailing list