[njs] Fixed expect tests for systems where echo -e is not available.

Dmitry Volyntsev xeioex at nginx.com
Fri Feb 9 17:34:59 UTC 2018


details:   http://hg.nginx.org/njs/rev/f3ed1e9fa8d2
branches:  
changeset: 440:f3ed1e9fa8d2
user:      Dmitry Volyntsev <xeioex at nginx.com>
date:      Fri Feb 09 20:34:44 2018 +0300
description:
Fixed expect tests for systems where echo -e is not available.

diffstat:

 njs/test/njs_expect_test.exp |  6 ++----
 njs/test/non_utf8            |  1 +
 2 files changed, 3 insertions(+), 4 deletions(-)

diffs (35 lines):

diff -r 0a9fbf9e925f -r f3ed1e9fa8d2 njs/test/njs_expect_test.exp
--- a/njs/test/njs_expect_test.exp	Fri Feb 09 20:12:41 2018 +0300
+++ b/njs/test/njs_expect_test.exp	Fri Feb 09 20:34:44 2018 +0300
@@ -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 -r 0a9fbf9e925f -r f3ed1e9fa8d2 njs/test/non_utf8
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/njs/test/non_utf8	Fri Feb 09 20:34:44 2018 +0300
@@ -0,0 +1,1 @@
+€€
\ No newline at end of file


More information about the nginx-devel mailing list