aboutsummaryrefslogtreecommitdiff
path: root/test/compress/ascii.js
diff options
context:
space:
mode:
authorDavid Bau <david.bau@gmail.com>2013-12-23 16:05:04 +0000
committerRichard van Velzen <rvanvelzen@experty.com>2016-06-12 14:32:32 +0200
commitf99b7b630daf85f85393d4508e2676456f2a3c4b (patch)
tree2a0413002882324028f6ef568b4224c77a354cbf /test/compress/ascii.js
parentea31da24559b095a18f7615cfd3c992ecaf495a3 (diff)
downloadtracifyjs-f99b7b630daf85f85393d4508e2676456f2a3c4b.tar.gz
tracifyjs-f99b7b630daf85f85393d4508e2676456f2a3c4b.zip
Escape null characters as \0 unless followed by 0-7.
Diffstat (limited to 'test/compress/ascii.js')
-rw-r--r--test/compress/ascii.js10
1 files changed, 6 insertions, 4 deletions
diff --git a/test/compress/ascii.js b/test/compress/ascii.js
index 5c6b3b8e..7686ac3f 100644
--- a/test/compress/ascii.js
+++ b/test/compress/ascii.js
@@ -6,12 +6,13 @@ ascii_only_true: {
}
input: {
function f() {
- return "\x00\x01\x02\x03\x04\x05\x06\x07\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f" +
+ return "\x000\x001\x007\x008\x00" +
+ "\x00\x01\x02\x03\x04\x05\x06\x07\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f" +
"\x10\x11\x12\x13\x14\x15\x16\x17\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f" +
"\x20\x21\x22\x23 ... \x7d\x7e\x7f\x80\x81 ... \xfe\xff\u0fff\uffff";
}
}
- expect_exact: 'function f(){return"\\x00\\x01\\x02\\x03\\x04\\x05\\x06\\x07\\b\\t\\n\\x0B\\f\\r\\x0e\\x0f"+"\\x10\\x11\\x12\\x13\\x14\\x15\\x16\\x17\\x18\\x19\\x1a\\x1b\\x1c\\x1d\\x1e\\x1f"+\' !"# ... }~\\x7f\\x80\\x81 ... \\xfe\\xff\\u0fff\\uffff\'}'
+ expect_exact: 'function f(){return"\\x000\\x001\\x007\\08\\0"+"\\0\\x01\\x02\\x03\\x04\\x05\\x06\\x07\\b\\t\\n\\x0B\\f\\r\\x0e\\x0f"+"\\x10\\x11\\x12\\x13\\x14\\x15\\x16\\x17\\x18\\x19\\x1a\\x1b\\x1c\\x1d\\x1e\\x1f"+\' !"# ... }~\\x7f\\x80\\x81 ... \\xfe\\xff\\u0fff\\uffff\'}'
}
ascii_only_false: {
@@ -22,11 +23,12 @@ ascii_only_false: {
}
input: {
function f() {
- return "\x00\x01\x02\x03\x04\x05\x06\x07\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f" +
+ return "\x000\x001\x007\x008\x00" +
+ "\x00\x01\x02\x03\x04\x05\x06\x07\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f" +
"\x10\x11\x12\x13\x14\x15\x16\x17\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f" +
"\x20\x21\x22\x23 ... \x7d\x7e\x7f\x80\x81 ... \xfe\xff\u0fff\uffff";
}
}
- expect_exact: 'function f(){return"\\x00\x01\x02\x03\x04\x05\x06\x07\\b\\t\\n\\x0B\\f\\r\x0e\x0f"+"\x10\x11\x12\x13\x14\x15\x16\x17\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f"+\' !"# ... }~\x7f\x80\x81 ... \xfe\xff\u0fff\uffff\'}'
+ expect_exact: 'function f(){return"\\x000\\x001\\x007\\08\\0"+"\\0\x01\x02\x03\x04\x05\x06\x07\\b\\t\\n\\x0B\\f\\r\x0e\x0f"+"\x10\x11\x12\x13\x14\x15\x16\x17\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f"+\' !"# ... }~\x7f\x80\x81 ... \xfe\xff\u0fff\uffff\'}'
}