Revision: 17975
Author: [email protected]
Date: Thu Nov 21 15:08:25 2013 UTC
Log: Experimental. More test files for latin1, fixed utf tests.
[email protected]
BUG=
Review URL: https://codereview.chromium.org/81053002
http://code.google.com/p/v8/source/detail?r=17975
Added:
/branches/experimental/parser/test/lexer/latin1-1.js
Modified:
/branches/experimental/parser/test/lexer/utf-1.js
/branches/experimental/parser/test/lexer/utf-2.js
/branches/experimental/parser/test/lexer/utf-3.js
/branches/experimental/parser/tools/lexer_generator/run-lexing-tests.py
=======================================
--- /dev/null
+++ /branches/experimental/parser/test/lexer/latin1-1.js Thu Nov 21
15:08:25 2013 UTC
@@ -0,0 +1,40 @@
+// Copyright 2013 the V8 project authors. All rights reserved.
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions are
+// met:
+//
+// * Redistributions of source code must retain the above copyright
+// notice, this list of conditions and the following disclaimer.
+// * Redistributions in binary form must reproduce the above
+// copyright notice, this list of conditions and the following
+// disclaimer in the documentation and/or other materials provided
+// with the distribution.
+// * Neither the name of Google Inc. nor the names of its
+// contributors may be used to endorse or promote products derived
+// from this software without specific prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+// (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 latin1, and contains weird letters.
+
+// ö is ok in identifiers.
+var fööbar = 16; // ö in latin1, but not in ascii.
+
+var inside_strings = "ö";
+var inside_strings2 = 'ö';
+
+// And inside a comment: ö
+
+/* And a multi-line comment ö */
+
+<!-- And an html comment ö -->
=======================================
--- /branches/experimental/parser/test/lexer/utf-1.js Thu Nov 21 14:34:38
2013 UTC
+++ /branches/experimental/parser/test/lexer/utf-1.js Thu Nov 21 15:08:25
2013 UTC
@@ -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;
=======================================
--- /branches/experimental/parser/test/lexer/utf-2.js Thu Nov 21 14:34:38
2013 UTC
+++ /branches/experimental/parser/test/lexer/utf-2.js Thu Nov 21 15:08:25
2013 UTC
@@ -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.
+
+var inside_strings = "öķ";
+var inside_strings2 = 'öķ';
+
+// And inside a comment: öķ
+
+/* And a multi-line comment öķ */
+
+<!-- And an html comment öķ -->
=======================================
--- /branches/experimental/parser/test/lexer/utf-3.js Thu Nov 21 14:34:38
2013 UTC
+++ /branches/experimental/parser/test/lexer/utf-3.js Thu Nov 21 15:08:25
2013 UTC
@@ -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 = "☃";
=======================================
--- /branches/experimental/parser/tools/lexer_generator/run-lexing-tests.py
Thu Nov 21 14:34:38 2013 UTC
+++ /branches/experimental/parser/tools/lexer_generator/run-lexing-tests.py
Thu Nov 21 15:08:25 2013 UTC
@@ -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 @@
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.