Reviewers: dcarney,
Message:
Committed patchset #1 manually as r17975 (presubmit successful).
Description:
Experimental. More test files for latin1, fixed utf tests.
[email protected]
BUG=
Committed: https://code.google.com/p/v8/source/detail?r=17975
Please review this at https://codereview.chromium.org/81053002/
SVN Base: https://v8.googlecode.com/svn/branches/experimental/parser
Affected files (+34, -16 lines):
A + test/lexer/latin1-1.js
M test/lexer/utf-1.js
M test/lexer/utf-2.js
M test/lexer/utf-3.js
M tools/lexer_generator/run-lexing-tests.py
Index: test/lexer/latin1-1.js
diff --git a/test/lexer/utf-3.js b/test/lexer/latin1-1.js
similarity index 85%
copy from test/lexer/utf-3.js
copy to test/lexer/latin1-1.js
index
8ebe1e4a7a301fd20453575239940aa1096eab8a..bf0d39a470c89621f809402b6e5d1584f6d1f957
100644
--- a/test/lexer/utf-3.js
+++ b/test/lexer/latin1-1.js
@@ -25,14 +25,16 @@
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-// This file is in utf-16, and contains weird characters in strings and
-// comments.
+// This file is in latin1, and contains weird letters.
-var here_it_is = "���";
-var here_too = '���';
+// � is ok in identifiers.
+var f��bar = 16; // � in latin1, but not in ascii.
-// And inside a comment: ���
+var inside_strings = "�";
+var inside_strings2 = '�';
-/* And a multi-line comment ��� */
+// And inside a comment: �
-<!-- And an html comment ��� -->
+/* And a multi-line comment � */
+
+<!-- And an html comment � -->
Index: test/lexer/utf-1.js
diff --git a/test/lexer/utf-1.js b/test/lexer/utf-1.js
index
815611fd747babba458f2afd804f791315b23e01..2f1ef5209649d4c955c9e0478fd95036e529719c
100644
--- a/test/lexer/utf-1.js
+++ b/test/lexer/utf-1.js
@@ -25,6 +25,7 @@
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-// This file is in utf-16, but doesn't contain any weird characters.
+// This file is in utf-8 (or rather, ASCII), but doesn't contain any weird
+// characters.
var foobar = 16;
\ No newline at end of file
Index: test/lexer/utf-2.js
diff --git a/test/lexer/utf-2.js b/test/lexer/utf-2.js
index
f2f5f73a18fe34d5432a51eec8726c57f5770c1e..f0bfbadb650344b0b7533e56101ae44d5f744ca1
100644
--- a/test/lexer/utf-2.js
+++ b/test/lexer/utf-2.js
@@ -25,7 +25,17 @@
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-// This file is in utf-16, and contains weird letters.
+// This file is in utf-8, and contains weird letters.
+// These letters are ok in identifiers.
var f����bar = 16; // �� in latin1, but not in ascii.
-var foo��ar = 17; // �� not in latin1.
\ No newline at end of file
+var foo��ar = 17; // �� not in latin1.
+
+var inside_strings = "����";
+var inside_strings2 = '����';
+
+// And inside a comment: ����
+
+/* And a multi-line comment ���� */
+
+<!-- And an html comment ���� -->
Index: test/lexer/utf-3.js
diff --git a/test/lexer/utf-3.js b/test/lexer/utf-3.js
index
8ebe1e4a7a301fd20453575239940aa1096eab8a..a5cf63dd25f17e99e4e7c1a58be7cae197d1e9f5
100644
--- a/test/lexer/utf-3.js
+++ b/test/lexer/utf-3.js
@@ -25,7 +25,7 @@
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-// This file is in utf-16, and contains weird characters in strings and
+// This file is in utf-8, and contains weird characters in strings and
// comments.
var here_it_is = "���";
Index: tools/lexer_generator/run-lexing-tests.py
diff --git a/tools/lexer_generator/run-lexing-tests.py
b/tools/lexer_generator/run-lexing-tests.py
index
b7d49e07519408ff034c181f63e67bb6318eda1f..0ef6bb9ee0a84e47a71f7114f7dfb4e43ac9caa9
100644
--- a/tools/lexer_generator/run-lexing-tests.py
+++ b/tools/lexer_generator/run-lexing-tests.py
@@ -28,6 +28,13 @@
import subprocess
import sys
+def wait_processes(processes):
+ for p in processes:
+ if p[1].wait():
+ print p[0], 'failed'
+ else:
+ print p[0], 'ok'
+
if __name__ == '__main__':
if len(sys.argv) < 4:
error_message = ('Usage:' + sys.argv[0] +
@@ -47,9 +54,7 @@ if __name__ == '__main__':
lexer_shell_args = [lexer_shell, f, '--break-after-illegal'] +
sys.argv[4:]
processes.append((f, subprocess.Popen(lexer_shell_args,
stdout=dev_null)))
if i % process_count == process_count - 1:
- for p in processes:
- if p[1].wait():
- print p[0], 'failed'
- else:
- print p[0], 'ok'
+ wait_processes(processes)
processes = []
+
+ wait_processes(processes)
--
--
v8-dev mailing list
[email protected]
http://groups.google.com/group/v8-dev
---
You received this message because you are subscribed to the Google Groups "v8-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
For more options, visit https://groups.google.com/groups/opt_out.