summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorNikita Popov <nikic@php.net>2015-03-21 20:10:19 +0100
committerNikita Popov <nikic@php.net>2015-04-02 16:31:17 +0200
commita8bf1c5d8f5755b53492e58040cfe88150eb57b6 (patch)
treec3b94b3c9cb7bdf5964a5428673459a78e12edc5 /tests
parent83a15801cc8619a1a83307e573bf1b63f0d4b53c (diff)
downloadphp-git-a8bf1c5d8f5755b53492e58040cfe88150eb57b6.tar.gz
Throw ParseException from lexer
Primarily to avoid getting fatal errors from token_get_all(). Implemented using a magic E_ERROR token, which the lexer emits to force a parser failure.
Diffstat (limited to 'tests')
-rw-r--r--tests/lang/invalid_octal.phpt2
-rw-r--r--tests/lang/string/unicode_escape_empty.phpt2
-rw-r--r--tests/lang/string/unicode_escape_incomplete.phpt2
-rw-r--r--tests/lang/string/unicode_escape_large_codepoint.phpt2
-rw-r--r--tests/lang/string/unicode_escape_sign.phpt2
-rw-r--r--tests/lang/string/unicode_escape_sign2.phpt2
-rw-r--r--tests/lang/string/unicode_escape_whitespace.phpt2
7 files changed, 7 insertions, 7 deletions
diff --git a/tests/lang/invalid_octal.phpt b/tests/lang/invalid_octal.phpt
index dd10f1c362..213b521e88 100644
--- a/tests/lang/invalid_octal.phpt
+++ b/tests/lang/invalid_octal.phpt
@@ -5,4 +5,4 @@ Invalid octal
$x = 08;
--EXPECTF--
-Fatal error: Invalid numeric literal in %s on line 3
+Parse error: Invalid numeric literal in %s on line 3
diff --git a/tests/lang/string/unicode_escape_empty.phpt b/tests/lang/string/unicode_escape_empty.phpt
index 77ee4e5481..0d975ef86a 100644
--- a/tests/lang/string/unicode_escape_empty.phpt
+++ b/tests/lang/string/unicode_escape_empty.phpt
@@ -5,4 +5,4 @@ Invalid Unicode escape sequence: Empty
var_dump("\u{}");
--EXPECTF--
-Fatal error: Invalid UTF-8 codepoint escape sequence in %s on line %d
+Parse error: Invalid UTF-8 codepoint escape sequence in %s on line %d
diff --git a/tests/lang/string/unicode_escape_incomplete.phpt b/tests/lang/string/unicode_escape_incomplete.phpt
index c1e095257b..b5baeffd6e 100644
--- a/tests/lang/string/unicode_escape_incomplete.phpt
+++ b/tests/lang/string/unicode_escape_incomplete.phpt
@@ -5,4 +5,4 @@ Invalid Unicode escape sequence: Incomplete
var_dunp("\u{blah");
--EXPECTF--
-Fatal error: Invalid UTF-8 codepoint escape sequence in %s on line %d
+Parse error: Invalid UTF-8 codepoint escape sequence in %s on line %d
diff --git a/tests/lang/string/unicode_escape_large_codepoint.phpt b/tests/lang/string/unicode_escape_large_codepoint.phpt
index 7a67430c93..249e6e152a 100644
--- a/tests/lang/string/unicode_escape_large_codepoint.phpt
+++ b/tests/lang/string/unicode_escape_large_codepoint.phpt
@@ -5,4 +5,4 @@ Invalid Unicode escape sequence: Large codepoint
var_dump("\u{110000}"); // U+10FFFF + 1
--EXPECTF--
-Fatal error: Invalid UTF-8 codepoint escape sequence: Codepoint too large in %s on line %d
+Parse error: Invalid UTF-8 codepoint escape sequence: Codepoint too large in %s on line %d
diff --git a/tests/lang/string/unicode_escape_sign.phpt b/tests/lang/string/unicode_escape_sign.phpt
index 6d8c0773fb..4f3ef7c72b 100644
--- a/tests/lang/string/unicode_escape_sign.phpt
+++ b/tests/lang/string/unicode_escape_sign.phpt
@@ -5,4 +5,4 @@ Invalid Unicode escape sequence: Positive sign
var_dump("\u{+1F602}");
--EXPECTF--
-Fatal error: Invalid UTF-8 codepoint escape sequence in %s on line %d
+Parse error: Invalid UTF-8 codepoint escape sequence in %s on line %d
diff --git a/tests/lang/string/unicode_escape_sign2.phpt b/tests/lang/string/unicode_escape_sign2.phpt
index 7b2c029049..daf34b3ab6 100644
--- a/tests/lang/string/unicode_escape_sign2.phpt
+++ b/tests/lang/string/unicode_escape_sign2.phpt
@@ -5,4 +5,4 @@ Invalid Unicode escape sequence: Negative sign
var_dump("\u{-1F602}");
--EXPECTF--
-Fatal error: Invalid UTF-8 codepoint escape sequence in %s on line %d
+Parse error: Invalid UTF-8 codepoint escape sequence in %s on line %d
diff --git a/tests/lang/string/unicode_escape_whitespace.phpt b/tests/lang/string/unicode_escape_whitespace.phpt
index f21d868861..11fa690210 100644
--- a/tests/lang/string/unicode_escape_whitespace.phpt
+++ b/tests/lang/string/unicode_escape_whitespace.phpt
@@ -5,4 +5,4 @@ Invalid Unicode escape sequence: Whitespace
var_dump("\u{1F602 }");
--EXPECTF--
-Fatal error: Invalid UTF-8 codepoint escape sequence in %s on line %d
+Parse error: Invalid UTF-8 codepoint escape sequence in %s on line %d