From f76966b4387607f54f294630ffc6d89a78530787 Mon Sep 17 00:00:00 2001 From: Petri Lehtinen Date: Fri, 26 Mar 2010 21:29:31 +0200 Subject: [PATCH] Enhance tests for null byte --- .../escaped-null-byte-in-string/error | 2 ++ .../escaped-null-byte-in-string/input | 1 + .../invalid-strip/null-byte-in-string/error | 2 +- .../invalid-strip/null-byte-in-string/input | Bin 34 -> 27 bytes .../invalid-strip/null-byte-outside-string/error | 2 ++ .../invalid-strip/null-byte-outside-string/input | Bin 0 -> 2 bytes .../invalid/escaped-null-byte-in-string/error | 2 ++ .../invalid/escaped-null-byte-in-string/input | 1 + test/suites/invalid/null-byte-in-string/error | 2 +- test/suites/invalid/null-byte-in-string/input | Bin 35 -> 28 bytes .../suites/invalid/null-byte-outside-string/error | 2 ++ .../suites/invalid/null-byte-outside-string/input | Bin 0 -> 3 bytes 12 files changed, 12 insertions(+), 2 deletions(-) create mode 100644 test/suites/invalid-strip/escaped-null-byte-in-string/error create mode 100644 test/suites/invalid-strip/escaped-null-byte-in-string/input create mode 100644 test/suites/invalid-strip/null-byte-outside-string/error create mode 100644 test/suites/invalid-strip/null-byte-outside-string/input create mode 100644 test/suites/invalid/escaped-null-byte-in-string/error create mode 100644 test/suites/invalid/escaped-null-byte-in-string/input create mode 100644 test/suites/invalid/null-byte-outside-string/error create mode 100644 test/suites/invalid/null-byte-outside-string/input diff --git a/test/suites/invalid-strip/escaped-null-byte-in-string/error b/test/suites/invalid-strip/escaped-null-byte-in-string/error new file mode 100644 index 0000000..0fa36e2 --- /dev/null +++ b/test/suites/invalid-strip/escaped-null-byte-in-string/error @@ -0,0 +1,2 @@ +1 +\u0000 is not allowed diff --git a/test/suites/invalid-strip/escaped-null-byte-in-string/input b/test/suites/invalid-strip/escaped-null-byte-in-string/input new file mode 100644 index 0000000..60f7f7b --- /dev/null +++ b/test/suites/invalid-strip/escaped-null-byte-in-string/input @@ -0,0 +1 @@ +["\u0000 (null byte not allowed)"] \ No newline at end of file diff --git a/test/suites/invalid-strip/null-byte-in-string/error b/test/suites/invalid-strip/null-byte-in-string/error index 0fa36e2..273f6d1 100644 --- a/test/suites/invalid-strip/null-byte-in-string/error +++ b/test/suites/invalid-strip/null-byte-in-string/error @@ -1,2 +1,2 @@ 1 -\u0000 is not allowed +control character 0x0 near '"null byte ' diff --git a/test/suites/invalid-strip/null-byte-in-string/input b/test/suites/invalid-strip/null-byte-in-string/input index 60f7f7bbe6b4cdfcb367c68bc81112c40bdedef2..c0d82be95b5b406347e4d8330c2d85d99b5240a7 100644 GIT binary patch literal 27 icma!6$}7#uQAnyRNmXD_$jdKLNX*H}FHcQTiUk0E%Lyd_ literal 34 ncma!6iYYY!0tJn{(wrQHq{@<1g}nR{g~Xhk{PNTkO{G`>x77;= diff --git a/test/suites/invalid-strip/null-byte-outside-string/error b/test/suites/invalid-strip/null-byte-outside-string/error new file mode 100644 index 0000000..f0e68ec --- /dev/null +++ b/test/suites/invalid-strip/null-byte-outside-string/error @@ -0,0 +1,2 @@ +1 +invalid token near end of file diff --git a/test/suites/invalid-strip/null-byte-outside-string/input b/test/suites/invalid-strip/null-byte-outside-string/input new file mode 100644 index 0000000000000000000000000000000000000000..75447d8282481c980d1a33a63b248bb4d2d46c87 GIT binary patch literal 2 Jcma!M0002E09*h7 literal 0 HcmV?d00001 diff --git a/test/suites/invalid/escaped-null-byte-in-string/error b/test/suites/invalid/escaped-null-byte-in-string/error new file mode 100644 index 0000000..0fa36e2 --- /dev/null +++ b/test/suites/invalid/escaped-null-byte-in-string/error @@ -0,0 +1,2 @@ +1 +\u0000 is not allowed diff --git a/test/suites/invalid/escaped-null-byte-in-string/input b/test/suites/invalid/escaped-null-byte-in-string/input new file mode 100644 index 0000000..22ae82b --- /dev/null +++ b/test/suites/invalid/escaped-null-byte-in-string/input @@ -0,0 +1 @@ +["\u0000 (null byte not allowed)"] diff --git a/test/suites/invalid/null-byte-in-string/error b/test/suites/invalid/null-byte-in-string/error index 0fa36e2..273f6d1 100644 --- a/test/suites/invalid/null-byte-in-string/error +++ b/test/suites/invalid/null-byte-in-string/error @@ -1,2 +1,2 @@ 1 -\u0000 is not allowed +control character 0x0 near '"null byte ' diff --git a/test/suites/invalid/null-byte-in-string/input b/test/suites/invalid/null-byte-in-string/input index 22ae82b2a5634ce945c75a89dce7b39b9b0bde2b..268d1f19435baef5ad7a609c65a951f6c8f6b30f 100644 GIT binary patch literal 28 jcma!6$}7#uQAnyRNmXD_$jdKLNX*H}FHcQTisb?Thx!RG literal 35 ocma!6iYYY!0tJn{(wrQHq{@<1g}nR{g~Xhk{PNTkO{G{a0K(=A5dZ)H diff --git a/test/suites/invalid/null-byte-outside-string/error b/test/suites/invalid/null-byte-outside-string/error new file mode 100644 index 0000000..f0e68ec --- /dev/null +++ b/test/suites/invalid/null-byte-outside-string/error @@ -0,0 +1,2 @@ +1 +invalid token near end of file diff --git a/test/suites/invalid/null-byte-outside-string/input b/test/suites/invalid/null-byte-outside-string/input new file mode 100644 index 0000000000000000000000000000000000000000..aa550eb0cd16b047736975b6c92ebd989d1981b3 GIT binary patch literal 3 Kcma!M-~s>v9sp(l literal 0 HcmV?d00001