]> git.kaiwu.me - njs.git/commitdiff
Fixed expect tests for systems where echo -e is not available.
authorDmitry Volyntsev <xeioex@nginx.com>
Fri, 9 Feb 2018 17:34:44 +0000 (20:34 +0300)
committerDmitry Volyntsev <xeioex@nginx.com>
Fri, 9 Feb 2018 17:34:44 +0000 (20:34 +0300)
njs/test/njs_expect_test.exp
njs/test/non_utf8 [new file with mode: 0644]

index 0f0b58c042bf34c9d94d838c0758a547be7ea6cb..d6adec6b81427f40ab2674a4b3d58937543085b1 100644 (file)
@@ -196,8 +196,6 @@ set file [open njs_test_file w]
 puts -nonewline $file "αβZγ"
 flush $file
 
-exec /bin/echo -ne {\x80\x80} > njs_test_file_non_utf8
-
 njs_test {
     {"var fs = require('fs')\r\n"
      "undefined\r\n>> "}
@@ -277,14 +275,14 @@ njs_test {
 njs_test {
     {"var fs = require('fs')\r\n"
      "undefined\r\n>> "}
-    {"fs.readFileSync('njs_test_file_non_utf8').charCodeAt(1)\r\n"
+    {"fs.readFileSync('./njs/test/non_utf8').charCodeAt(1)\r\n"
      "128"}
 }
 
 njs_test {
     {"var fs = require('fs')\r\n"
      "undefined\r\n>> "}
-    {"fs.readFileSync('njs_test_file_non_utf8', 'utf8')\r\n"
+    {"fs.readFileSync('./njs/test/non_utf8', 'utf8')\r\n"
      "Error: Non-UTF8 file, convertion is not implemented"}
 }
 
diff --git a/njs/test/non_utf8 b/njs/test/non_utf8
new file mode 100644 (file)
index 0000000..f8834a2
--- /dev/null
@@ -0,0 +1 @@
+\80\80
\ No newline at end of file