[njs] Unifying quotes usage in exceptions.

Dmitry Volyntsev xeioex at nginx.com
Wed Jan 30 15:56:40 UTC 2019


details:   https://hg.nginx.org/njs/rev/ac9b1c01a9b0
branches:  
changeset: 747:ac9b1c01a9b0
user:      Dmitry Volyntsev <xeioex at nginx.com>
date:      Wed Jan 30 18:50:33 2019 +0300
description:
Unifying quotes usage in exceptions.

diffstat:

 njs/njs_crypto.c                |   20 ++--
 njs/njs_date.c                  |    2 +-
 njs/njs_error.c                 |    2 +-
 njs/njs_fs.c                    |   16 +-
 njs/njs_function.c              |    8 +-
 njs/njs_module.c                |    2 +-
 njs/njs_object.c                |    8 +-
 njs/njs_regexp.c                |    6 +-
 njs/njs_string.c                |    6 +-
 njs/njs_vm.c                    |   16 +-
 njs/test/njs_expect_test.exp    |    4 +-
 njs/test/njs_interactive_test.c |   16 +-
 njs/test/njs_unit_test.c        |  162 ++++++++++++++++++++--------------------
 13 files changed, 134 insertions(+), 134 deletions(-)

diffs (truncated from 1067 to 1000 lines):

diff -r dbffb3031c77 -r ac9b1c01a9b0 njs/njs_crypto.c
--- a/njs/njs_crypto.c	Wed Jan 30 18:49:33 2019 +0300
+++ b/njs/njs_crypto.c	Wed Jan 30 18:50:33 2019 +0300
@@ -211,12 +211,12 @@ njs_hash_prototype_update(njs_vm_t *vm, 
     }
 
     if (nxt_slow_path(!njs_is_object_value(&args[0]))) {
-        njs_type_error(vm, "'this' is not an object_value");
+        njs_type_error(vm, "\"this\" is not an object_value");
         return NJS_ERROR;
     }
 
     if (nxt_slow_path(!njs_is_data(&args[0].data.u.object_value->value))) {
-        njs_type_error(vm, "value of 'this' is not a data type");
+        njs_type_error(vm, "value of \"this\" is not a data type");
         return NJS_ERROR;
     }
 
@@ -257,12 +257,12 @@ njs_hash_prototype_digest(njs_vm_t *vm, 
     }
 
     if (nxt_slow_path(!njs_is_object_value(&args[0]))) {
-        njs_type_error(vm, "'this' is not an object_value");
+        njs_type_error(vm, "\"this\" is not an object_value");
         return NJS_ERROR;
     }
 
     if (nxt_slow_path(!njs_is_data(&args[0].data.u.object_value->value))) {
-        njs_type_error(vm, "value of 'this' is not a data type");
+        njs_type_error(vm, "value of \"this\" is not a data type");
         return NJS_ERROR;
     }
 
@@ -470,12 +470,12 @@ njs_hmac_prototype_update(njs_vm_t *vm, 
     }
 
     if (nxt_slow_path(!njs_is_object_value(&args[0]))) {
-        njs_type_error(vm, "'this' is not an object_value");
+        njs_type_error(vm, "\"this\" is not an object_value");
         return NJS_ERROR;
     }
 
     if (nxt_slow_path(!njs_is_data(&args[0].data.u.object_value->value))) {
-        njs_type_error(vm, "value of 'this' is not a data type");
+        njs_type_error(vm, "value of \"this\" is not a data type");
         return NJS_ERROR;
     }
 
@@ -516,12 +516,12 @@ njs_hmac_prototype_digest(njs_vm_t *vm, 
     }
 
     if (nxt_slow_path(!njs_is_object_value(&args[0]))) {
-        njs_type_error(vm, "'this' is not an object_value");
+        njs_type_error(vm, "\"this\" is not an object_value");
         return NJS_ERROR;
     }
 
     if (nxt_slow_path(!njs_is_data(&args[0].data.u.object_value->value))) {
-        njs_type_error(vm, "value of 'this' is not a data type");
+        njs_type_error(vm, "value of \"this\" is not a data type");
         return NJS_ERROR;
     }
 
@@ -691,7 +691,7 @@ njs_crypto_alg(njs_vm_t *vm, const nxt_s
         }
     }
 
-    njs_type_error(vm, "not supported algorithm: '%V'", name);
+    njs_type_error(vm, "not supported algorithm: \"%V\"", name);
 
     return NULL;
 }
@@ -708,7 +708,7 @@ njs_crypto_encoding(njs_vm_t *vm, const 
         }
     }
 
-    njs_type_error(vm, "Unknown digest encoding: '%V'", name);
+    njs_type_error(vm, "Unknown digest encoding: \"%V\"", name);
 
     return NULL;
 }
diff -r dbffb3031c77 -r ac9b1c01a9b0 njs/njs_date.c
--- a/njs/njs_date.c	Wed Jan 30 18:49:33 2019 +0300
+++ b/njs/njs_date.c	Wed Jan 30 18:50:33 2019 +0300
@@ -1901,7 +1901,7 @@ njs_date_prototype_to_json(njs_vm_t *vm,
         }
     }
 
-    njs_type_error(vm, "'this' argument is not an object");
+    njs_type_error(vm, "\"this\" argument is not an object");
 
     return NXT_ERROR;
 }
diff -r dbffb3031c77 -r ac9b1c01a9b0 njs/njs_error.c
--- a/njs/njs_error.c	Wed Jan 30 18:49:33 2019 +0300
+++ b/njs/njs_error.c	Wed Jan 30 18:50:33 2019 +0300
@@ -583,7 +583,7 @@ njs_error_prototype_to_string(njs_vm_t *
     njs_index_t unused)
 {
     if (nargs < 1 || !njs_is_object(&args[0])) {
-        njs_type_error(vm, "'this' argument is not an object");
+        njs_type_error(vm, "\"this\" argument is not an object");
         return NXT_ERROR;
     }
 
diff -r dbffb3031c77 -r ac9b1c01a9b0 njs/njs_fs.c
--- a/njs/njs_fs.c	Wed Jan 30 18:49:33 2019 +0300
+++ b/njs/njs_fs.c	Wed Jan 30 18:50:33 2019 +0300
@@ -165,7 +165,7 @@ njs_fs_read_file(njs_vm_t *vm, njs_value
 
     flags = njs_fs_flags(&flag);
     if (nxt_slow_path(flags == -1)) {
-        njs_type_error(vm, "Unknown file open flags: '%V'", &flag);
+        njs_type_error(vm, "Unknown file open flags: \"%V\"", &flag);
         return NJS_ERROR;
     }
 
@@ -177,7 +177,7 @@ njs_fs_read_file(njs_vm_t *vm, njs_value
     if (encoding.length != 0
         && (encoding.length != 4 || memcmp(encoding.start, "utf8", 4) != 0))
     {
-        njs_type_error(vm, "Unknown encoding: '%V'", &encoding);
+        njs_type_error(vm, "Unknown encoding: \"%V\"", &encoding);
         return NJS_ERROR;
     }
 
@@ -360,7 +360,7 @@ njs_fs_read_file_sync(njs_vm_t *vm, njs_
 
     flags = njs_fs_flags(&flag);
     if (nxt_slow_path(flags == -1)) {
-        njs_type_error(vm, "Unknown file open flags: '%V'", &flag);
+        njs_type_error(vm, "Unknown file open flags: \"%V\"", &flag);
         return NJS_ERROR;
     }
 
@@ -372,7 +372,7 @@ njs_fs_read_file_sync(njs_vm_t *vm, njs_
     if (encoding.length != 0
         && (encoding.length != 4 || memcmp(encoding.start, "utf8", 4) != 0))
     {
-        njs_type_error(vm, "Unknown encoding: '%V'", &encoding);
+        njs_type_error(vm, "Unknown encoding: \"%V\"", &encoding);
         return NJS_ERROR;
     }
 
@@ -607,7 +607,7 @@ static njs_ret_t njs_fs_write_file_inter
     if (flag.start != NULL) {
         flags = njs_fs_flags(&flag);
         if (nxt_slow_path(flags == -1)) {
-            njs_type_error(vm, "Unknown file open flags: '%V'", &flag);
+            njs_type_error(vm, "Unknown file open flags: \"%V\"", &flag);
             return NJS_ERROR;
         }
 
@@ -630,7 +630,7 @@ static njs_ret_t njs_fs_write_file_inter
     if (encoding.length != 0
         && (encoding.length != 4 || memcmp(encoding.start, "utf8", 4) != 0))
     {
-        njs_type_error(vm, "Unknown encoding: '%V'", &encoding);
+        njs_type_error(vm, "Unknown encoding: \"%V\"", &encoding);
         return NJS_ERROR;
     }
 
@@ -779,7 +779,7 @@ njs_fs_write_file_sync_internal(njs_vm_t
     if (flag.start != NULL) {
         flags = njs_fs_flags(&flag);
         if (nxt_slow_path(flags == -1)) {
-            njs_type_error(vm, "Unknown file open flags: '%V'", &flag);
+            njs_type_error(vm, "Unknown file open flags: \"%V\"", &flag);
             return NJS_ERROR;
         }
 
@@ -802,7 +802,7 @@ njs_fs_write_file_sync_internal(njs_vm_t
     if (encoding.length != 0
         && (encoding.length != 4 || memcmp(encoding.start, "utf8", 4) != 0))
     {
-        njs_type_error(vm, "Unknown encoding: '%V'", &encoding);
+        njs_type_error(vm, "Unknown encoding: \"%V\"", &encoding);
         return NJS_ERROR;
     }
 
diff -r dbffb3031c77 -r ac9b1c01a9b0 njs/njs_function.c
--- a/njs/njs_function.c	Wed Jan 30 18:49:33 2019 +0300
+++ b/njs/njs_function.c	Wed Jan 30 18:50:33 2019 +0300
@@ -208,7 +208,7 @@ njs_ret_t
 njs_function_arguments_thrower(njs_vm_t *vm, njs_value_t *value,
     njs_value_t *setval, njs_value_t *retval)
 {
-    njs_type_error(vm, "'caller', 'callee' properties may not be accessed");
+    njs_type_error(vm, "\"caller\", \"callee\" properties may not be accessed");
     return NXT_ERROR;
 }
 
@@ -865,7 +865,7 @@ njs_function_prototype_call(njs_vm_t *vm
     njs_function_t  *function;
 
     if (!njs_is_function(&args[0])) {
-        njs_type_error(vm, "'this' argument is not a function");
+        njs_type_error(vm, "\"this\" argument is not a function");
         return NXT_ERROR;
     }
 
@@ -903,7 +903,7 @@ njs_function_prototype_apply(njs_vm_t *v
     njs_function_t  *function;
 
     if (!njs_is_function(&args[0])) {
-        njs_type_error(vm, "'this' argument is not a function");
+        njs_type_error(vm, "\"this\" argument is not a function");
         return NXT_ERROR;
     }
 
@@ -988,7 +988,7 @@ njs_function_prototype_bind(njs_vm_t *vm
     njs_function_t  *function;
 
     if (!njs_is_function(&args[0])) {
-        njs_type_error(vm, "'this' argument is not a function");
+        njs_type_error(vm, "\"this\" argument is not a function");
         return NXT_ERROR;
     }
 
diff -r dbffb3031c77 -r ac9b1c01a9b0 njs/njs_module.c
--- a/njs/njs_module.c	Wed Jan 30 18:49:33 2019 +0300
+++ b/njs/njs_module.c	Wed Jan 30 18:50:33 2019 +0300
@@ -62,7 +62,7 @@ njs_ret_t njs_module_require(njs_vm_t *v
         return NXT_OK;
     }
 
-    njs_error(vm, "Cannot find module '%V'", &lhq.key);
+    njs_error(vm, "Cannot find module \"%V\"", &lhq.key);
 
     return NJS_ERROR;
 }
diff -r dbffb3031c77 -r ac9b1c01a9b0 njs/njs_object.c
--- a/njs/njs_object.c	Wed Jan 30 18:49:33 2019 +0300
+++ b/njs/njs_object.c	Wed Jan 30 18:50:33 2019 +0300
@@ -364,12 +364,12 @@ njs_property_query(njs_vm_t *vm, njs_pro
 
         if (nxt_fast_path(ret == NXT_OK)) {
             njs_string_get(&pq->value, &pq->lhq.key);
-            njs_type_error(vm, "cannot get property '%V' of undefined",
+            njs_type_error(vm, "cannot get property \"%V\" of undefined",
                            &pq->lhq.key);
             return NXT_ERROR;
         }
 
-        njs_type_error(vm, "cannot get property 'unknown' of undefined");
+        njs_type_error(vm, "cannot get property \"unknown\" of undefined");
 
         return NXT_ERROR;
     }
@@ -1483,7 +1483,7 @@ njs_define_property(njs_vm_t *vm, njs_va
         return NXT_OK;
 
     default:
-        njs_internal_error(vm, "unexpected property type '%s' "
+        njs_internal_error(vm, "unexpected property type \"%s\" "
                            "while defining property",
                            njs_prop_type_string(current->type));
 
@@ -1535,7 +1535,7 @@ njs_define_property(njs_vm_t *vm, njs_va
 
 exception:
 
-    njs_type_error(vm, "Cannot redefine property: '%V'", &pq.lhq.key);
+    njs_type_error(vm, "Cannot redefine property: \"%V\"", &pq.lhq.key);
 
     return NXT_ERROR;
 }
diff -r dbffb3031c77 -r ac9b1c01a9b0 njs/njs_regexp.c
--- a/njs/njs_regexp.c	Wed Jan 30 18:49:33 2019 +0300
+++ b/njs/njs_regexp.c	Wed Jan 30 18:50:33 2019 +0300
@@ -540,7 +540,7 @@ njs_regexp_prototype_to_string(njs_vm_t 
         return njs_regexp_to_string(vm, &vm->retval, &args[0]);
     }
 
-    njs_type_error(vm, "'this' argument is not a regexp");
+    njs_type_error(vm, "\"this\" argument is not a regexp");
 
     return NXT_ERROR;
 }
@@ -577,7 +577,7 @@ njs_regexp_prototype_test(njs_vm_t *vm, 
     njs_regexp_pattern_t  *pattern;
 
     if (!njs_is_regexp(&args[0])) {
-        njs_type_error(vm, "'this' argument is not a regexp");
+        njs_type_error(vm, "\"this\" argument is not a regexp");
         return NXT_ERROR;
     }
 
@@ -627,7 +627,7 @@ njs_regexp_prototype_exec(njs_vm_t *vm, 
     nxt_regex_match_data_t  *match_data;
 
     if (!njs_is_regexp(&args[0])) {
-        njs_type_error(vm, "'this' argument is not a regexp");
+        njs_type_error(vm, "\"this\" argument is not a regexp");
         return NXT_ERROR;
     }
 
diff -r dbffb3031c77 -r ac9b1c01a9b0 njs/njs_string.c
--- a/njs/njs_string.c	Wed Jan 30 18:49:33 2019 +0300
+++ b/njs/njs_string.c	Wed Jan 30 18:50:33 2019 +0300
@@ -808,7 +808,7 @@ njs_string_prototype_to_string(njs_vm_t 
         return njs_string_base64url(vm, &vm->retval, &str);
     }
 
-    njs_type_error(vm, "Unknown encoding: '%V'", &enc);
+    njs_type_error(vm, "Unknown encoding: \"%V\"", &enc);
 
     return NJS_ERROR;
 }
@@ -829,7 +829,7 @@ njs_string_prototype_concat(njs_vm_t *vm
     njs_string_prop_t  string;
 
     if (njs_is_null_or_void(&args[0])) {
-        njs_type_error(vm, "'this' argument is null or undefined");
+        njs_type_error(vm, "\"this\" argument is null or undefined");
         return NXT_ERROR;
     }
 
@@ -1486,7 +1486,7 @@ njs_string_bytes_from_string(njs_vm_t *v
         return njs_string_decode_base64url(vm, &vm->retval, &str);
     }
 
-    njs_type_error(vm, "Unknown encoding: '%V'", &enc);
+    njs_type_error(vm, "Unknown encoding: \"%V\"", &enc);
 
     return NJS_ERROR;
 }
diff -r dbffb3031c77 -r ac9b1c01a9b0 njs/njs_vm.c
--- a/njs/njs_vm.c	Wed Jan 30 18:49:33 2019 +0300
+++ b/njs/njs_vm.c	Wed Jan 30 18:50:33 2019 +0300
@@ -555,7 +555,7 @@ njs_vmcode_property_set(njs_vm_t *vm, nj
             break;
 
         default:
-            njs_internal_error(vm, "unexpected property type '%s' "
+            njs_internal_error(vm, "unexpected property type \"%s\" "
                                "while setting",
                                njs_prop_type_string(prop->type));
 
@@ -566,7 +566,7 @@ njs_vmcode_property_set(njs_vm_t *vm, nj
 
     case NXT_DECLINED:
         if (nxt_slow_path(!object->data.u.object->extensible)) {
-            njs_type_error(vm, "Cannot add property '%V', "
+            njs_type_error(vm, "Cannot add property \"%V\", "
                            "object is not extensible", &pq.lhq.key);
             return NXT_ERROR;
         }
@@ -609,7 +609,7 @@ njs_vmcode_property_set(njs_vm_t *vm, nj
     }
 
     if (nxt_slow_path(!prop->writable)) {
-        njs_type_error(vm, "Cannot assign to read-only property '%V' of %s",
+        njs_type_error(vm, "Cannot assign to read-only property \"%V\" of %s",
                        &pq.lhq.key, njs_type_string(object->type));
         return NXT_ERROR;
     }
@@ -712,7 +712,7 @@ njs_vmcode_property_delete(njs_vm_t *vm,
             break;
 
         default:
-            njs_internal_error(vm, "unexpected property type '%s' "
+            njs_internal_error(vm, "unexpected property type \"%s\" "
                                "while deleting",
                                njs_prop_type_string(prop->type));
 
@@ -720,7 +720,7 @@ njs_vmcode_property_delete(njs_vm_t *vm,
         }
 
         if (nxt_slow_path(!prop->configurable)) {
-            njs_type_error(vm, "Cannot delete property '%V' of %s",
+            njs_type_error(vm, "Cannot delete property \"%V\" of %s",
                            &pq.lhq.key, njs_type_string(object->type));
             return NXT_ERROR;
         }
@@ -1968,7 +1968,7 @@ njs_vmcode_method_frame(njs_vm_t *vm, nj
             break;
 
         default:
-            njs_internal_error(vm, "unexpected property type '%s' "
+            njs_internal_error(vm, "unexpected property type \"%s\" "
                                "while getting method",
                                njs_prop_type_string(prop->type));
 
@@ -1991,7 +1991,7 @@ njs_vmcode_method_frame(njs_vm_t *vm, nj
 
     if (value == NULL || !njs_is_function(value)) {
         njs_string_get(name, &string);
-        njs_type_error(vm, "'%V' is not a function", &string);
+        njs_type_error(vm, "\"%V\" is not a function", &string);
         return NXT_ERROR;
     }
 
@@ -3020,7 +3020,7 @@ njs_value_property(njs_vm_t *vm, njs_val
             break;
 
         default:
-            njs_internal_error(vm, "unexpected property type '%s' "
+            njs_internal_error(vm, "unexpected property type \"%s\" "
                                "while getting",
                                njs_prop_type_string(prop->type));
 
diff -r dbffb3031c77 -r ac9b1c01a9b0 njs/test/njs_expect_test.exp
--- a/njs/test/njs_expect_test.exp	Wed Jan 30 18:49:33 2019 +0300
+++ b/njs/test/njs_expect_test.exp	Wed Jan 30 18:50:33 2019 +0300
@@ -208,7 +208,7 @@ njs_test {
 
 njs_test {
     {"console.ll()\r\n"
-     "console.ll()\r\nTypeError: 'll' is not a function"}
+     "console.ll()\r\nTypeError: \"ll\" is not a function"}
 }
 
 njs_test {
@@ -606,7 +606,7 @@ njs_test {
 
 njs_test {
     {"var fs = require('fs')\r\n"
-     "Error: Cannot find module 'fs'\r\n"}
+     "Error: Cannot find module \"fs\"\r\n"}
 } "-s"
 
 njs_test {
diff -r dbffb3031c77 -r ac9b1c01a9b0 njs/test/njs_interactive_test.c
--- a/njs/test/njs_interactive_test.c	Wed Jan 30 18:49:33 2019 +0300
+++ b/njs/test/njs_interactive_test.c	Wed Jan 30 18:50:33 2019 +0300
@@ -115,7 +115,7 @@ static njs_interactive_test_t  njs_test[
     { nxt_string("function ff(o) {return o.a.a}" ENTER
                  "function f(o) {return ff(o)}" ENTER
                  "f({})" ENTER),
-      nxt_string("TypeError: cannot get property 'a' of undefined\n"
+      nxt_string("TypeError: cannot get property \"a\" of undefined\n"
                  "    at ff (:1)\n"
                  "    at f (:1)\n"
                  "    at main (native)\n") },
@@ -124,20 +124,20 @@ static njs_interactive_test_t  njs_test[
                  "function f(o) {try {return ff(o)} "
                                  "finally {return o.a.a}}" ENTER
                  "f({})" ENTER),
-      nxt_string("TypeError: cannot get property 'a' of undefined\n"
+      nxt_string("TypeError: cannot get property \"a\" of undefined\n"
                  "    at f (:1)\n"
                  "    at main (native)\n") },
 
     { nxt_string("function f(ff, o) {return ff(o)}" ENTER
                  "f(function (o) {return o.a.a}, {})" ENTER),
-      nxt_string("TypeError: cannot get property 'a' of undefined\n"
+      nxt_string("TypeError: cannot get property \"a\" of undefined\n"
                  "    at anonymous (:1)\n"
                  "    at f (:1)\n"
                  "    at main (native)\n") },
 
     { nxt_string("'str'.replace(/t/g,"
                  "              function(m) {return m.a.a})" ENTER),
-      nxt_string("TypeError: cannot get property 'a' of undefined\n"
+      nxt_string("TypeError: cannot get property \"a\" of undefined\n"
                  "    at anonymous (:1)\n"
                  "    at String.prototype.replace (native)\n"
                  "    at main (native)\n") },
@@ -155,7 +155,7 @@ static njs_interactive_test_t  njs_test[
                  "    at main (native)\n") },
 
     { nxt_string("Math.log({}.a.a)" ENTER),
-      nxt_string("TypeError: cannot get property 'a' of undefined\n"
+      nxt_string("TypeError: cannot get property \"a\" of undefined\n"
                  "    at Math.log (native)\n"
                  "    at main (native)\n") },
 
@@ -175,7 +175,7 @@ static njs_interactive_test_t  njs_test[
                  "    at main (native)\n") },
 
     { nxt_string("require('crypto').createHash('sha')" ENTER),
-      nxt_string("TypeError: not supported algorithm: 'sha'\n"
+      nxt_string("TypeError: not supported algorithm: \"sha\"\n"
                  "    at crypto.createHash (native)\n"
                  "    at main (native)\n") },
 
@@ -198,14 +198,14 @@ static njs_interactive_test_t  njs_test[
 
     { nxt_string("function f(o) {function f_in(o) {return o.a.a};"
                  "               return f_in(o)}; f({})" ENTER),
-      nxt_string("TypeError: cannot get property 'a' of undefined\n"
+      nxt_string("TypeError: cannot get property \"a\" of undefined\n"
                  "    at f_in (:1)\n"
                  "    at f (:1)\n"
                  "    at main (native)\n") },
 
     { nxt_string("function f(o) {var ff = function (o) {return o.a.a};"
                  "               return ff(o)}; f({})" ENTER),
-      nxt_string("TypeError: cannot get property 'a' of undefined\n"
+      nxt_string("TypeError: cannot get property \"a\" of undefined\n"
                  "    at anonymous (:1)\n"
                  "    at f (:1)\n"
                  "    at main (native)\n") },
diff -r dbffb3031c77 -r ac9b1c01a9b0 njs/test/njs_unit_test.c
--- a/njs/test/njs_unit_test.c	Wed Jan 30 18:49:33 2019 +0300
+++ b/njs/test/njs_unit_test.c	Wed Jan 30 18:50:33 2019 +0300
@@ -551,7 +551,7 @@ static njs_unit_test_t  njs_test[] =
       nxt_string("TypeError: argument must be a byte string") },
 
     { nxt_string("'A'.toBytes().toString('latin1')"),
-      nxt_string("TypeError: Unknown encoding: 'latin1'") },
+      nxt_string("TypeError: Unknown encoding: \"latin1\"") },
 
     { nxt_string("'ABCD'.toBytes().toString('hex')"),
       nxt_string("41424344") },
@@ -2624,7 +2624,7 @@ static njs_unit_test_t  njs_test[] =
       nxt_string("undefined") },
 
     { nxt_string("var a = {}; a.b.c"),
-      nxt_string("TypeError: cannot get property 'c' of undefined") },
+      nxt_string("TypeError: cannot get property \"c\" of undefined") },
 
     { nxt_string("'a'[0]"),
       nxt_string("a") },
@@ -2672,10 +2672,10 @@ static njs_unit_test_t  njs_test[] =
       nxt_string("3") },
 
     { nxt_string("var a = undefined; a.b++; a.b"),
-      nxt_string("TypeError: cannot get property 'b' of undefined") },
+      nxt_string("TypeError: cannot get property \"b\" of undefined") },
 
     { nxt_string("var a = null; a.b++; a.b"),
-      nxt_string("TypeError: cannot get property 'b' of undefined") },
+      nxt_string("TypeError: cannot get property \"b\" of undefined") },
 
     { nxt_string("var a = true; a.b++; a.b"),
       nxt_string("TypeError: property set on primitive boolean type") },
@@ -2738,7 +2738,7 @@ static njs_unit_test_t  njs_test[] =
       nxt_string("SyntaxError: Unexpected token \";\" in 1") },
 
     { nxt_string("var x = { a: 1, b: x.a }"),
-      nxt_string("TypeError: cannot get property 'a' of undefined") },
+      nxt_string("TypeError: cannot get property \"a\" of undefined") },
 
     { nxt_string("var a = { b: 2 }; a.b += 1"),
       nxt_string("3") },
@@ -2829,10 +2829,10 @@ static njs_unit_test_t  njs_test[] =
     /* Math object is immutable. */
 
     { nxt_string("delete Math.max"),
-      nxt_string("TypeError: Cannot delete property 'max' of object") },
+      nxt_string("TypeError: Cannot delete property \"max\" of object") },
 
     { nxt_string("Math.E = 1"),
-      nxt_string("TypeError: Cannot assign to read-only property 'E' of object") },
+      nxt_string("TypeError: Cannot assign to read-only property \"E\" of object") },
 
     { nxt_string("var o = { 'a': 1, 'b': 2 }; var i; "
                  "for (i in o) { delete o.a; delete o.b; }; njs.dump(o)"),
@@ -4365,9 +4365,9 @@ static njs_unit_test_t  njs_test[] =
       nxt_string("12") },
 
     { nxt_string("var p = $r3.props; p.a = 1"),
-      nxt_string("TypeError: Cannot assign to read-only property 'a' of external") },
+      nxt_string("TypeError: Cannot assign to read-only property \"a\" of external") },
     { nxt_string("var p = $r3.props; delete p.a"),
-      nxt_string("TypeError: Cannot delete property 'a' of external") },
+      nxt_string("TypeError: Cannot delete property \"a\" of external") },
 
     { nxt_string("$r.vars.p + $r2.vars.q + $r3.vars.k"),
       nxt_string("pvalqvalkval") },
@@ -4400,10 +4400,10 @@ static njs_unit_test_t  njs_test[] =
       nxt_string("b") },
 
     { nxt_string("$r3.vars.error = 1"),
-      nxt_string("Error: cannot set 'error' prop") },
+      nxt_string("Error: cannot set \"error\" prop") },
 
     { nxt_string("delete $r3.vars.error"),
-      nxt_string("Error: cannot delete 'error' prop") },
+      nxt_string("Error: cannot delete \"error\" prop") },
 
     { nxt_string("delete $r3.vars.e"),
       nxt_string("true") },
@@ -4412,10 +4412,10 @@ static njs_unit_test_t  njs_test[] =
       nxt_string("kval") },
 
     { nxt_string("$r3.consts.k = 1"),
-      nxt_string("TypeError: Cannot assign to read-only property 'k' of external") },
+      nxt_string("TypeError: Cannot assign to read-only property \"k\" of external") },
 
     { nxt_string("delete $r3.consts.k"),
-      nxt_string("TypeError: Cannot delete property 'k' of external") },
+      nxt_string("TypeError: Cannot delete property \"k\" of external") },
 
     { nxt_string("delete $r3.vars.p; $r3.vars.p"),
       nxt_string("undefined") },
@@ -4464,10 +4464,10 @@ static njs_unit_test_t  njs_test[] =
       nxt_string("true") },
 
     { nxt_string("delete $r.uri"),
-      nxt_string("TypeError: Cannot delete property 'uri' of external") },
+      nxt_string("TypeError: Cannot delete property \"uri\" of external") },
 
     { nxt_string("delete $r.one"),
-      nxt_string("TypeError: Cannot delete property 'one' of external") },
+      nxt_string("TypeError: Cannot delete property \"one\" of external") },
 
     { nxt_string("$r.some_method.call($r, 'YES')"),
       nxt_string("АБВ") },
@@ -4488,7 +4488,7 @@ static njs_unit_test_t  njs_test[] =
       nxt_string("undefined") },
 
     { nxt_string("$r.error = 'OK'"),
-      nxt_string("TypeError: Cannot assign to read-only property 'error' of external") },
+      nxt_string("TypeError: Cannot assign to read-only property \"error\" of external") },
 
     { nxt_string("var a = { toString: function() { return 1 } }; a"),
       nxt_string("1") },
@@ -5314,7 +5314,7 @@ static njs_unit_test_t  njs_test[] =
       nxt_string("0") },
 
     { nxt_string("function f() { }; f.length = 1"),
-      nxt_string("TypeError: Cannot assign to read-only property 'length' of function") },
+      nxt_string("TypeError: Cannot assign to read-only property \"length\" of function") },
 
     { nxt_string("function f(...rest) { }; f.length"),
       nxt_string("0") },
@@ -5396,7 +5396,7 @@ static njs_unit_test_t  njs_test[] =
       nxt_string("TypeError: number is not a function") },
 
     { nxt_string("var o = {a:1}; o.a()"),
-      nxt_string("TypeError: 'a' is not a function") },
+      nxt_string("TypeError: \"a\" is not a function") },
 
     { nxt_string("(function(){})()"),
       nxt_string("undefined") },
@@ -5769,7 +5769,7 @@ static njs_unit_test_t  njs_test[] =
       nxt_string("[object Function]") },
 
     { nxt_string("''.concat.call()"),
-      nxt_string("TypeError: 'this' argument is null or undefined") },
+      nxt_string("TypeError: \"this\" argument is null or undefined") },
 
     { nxt_string("''.concat.call('a', 'b', 'c')"),
       nxt_string("abc") },
@@ -5784,7 +5784,7 @@ static njs_unit_test_t  njs_test[] =
       nxt_string("ab,cd") },
 
     { nxt_string("''.concat.apply()"),
-      nxt_string("TypeError: 'this' argument is null or undefined") },
+      nxt_string("TypeError: \"this\" argument is null or undefined") },
 
     { nxt_string("''.concat.apply('a')"),
       nxt_string("a") },
@@ -5855,7 +5855,7 @@ static njs_unit_test_t  njs_test[] =
       nxt_string("01") },
 
     { nxt_string("var concat = ''.concat; concat(1,2,3)"),
-      nxt_string("TypeError: 'this' argument is null or undefined") },
+      nxt_string("TypeError: \"this\" argument is null or undefined") },
 
     { nxt_string("var concat = ''.concat; concat.call(1,2,3)"),
       nxt_string("123") },
@@ -6064,10 +6064,10 @@ static njs_unit_test_t  njs_test[] =
       nxt_string("1") },
 
     { nxt_string("(function(){return arguments.callee;})()"),
-      nxt_string("TypeError: 'caller', 'callee' properties may not be accessed") },
+      nxt_string("TypeError: \"caller\", \"callee\" properties may not be accessed") },
 
     { nxt_string("(function(){return arguments.caller;})()"),
-      nxt_string("TypeError: 'caller', 'callee' properties may not be accessed") },
+      nxt_string("TypeError: \"caller\", \"callee\" properties may not be accessed") },
 
     { nxt_string("function sum() { var args = Array.prototype.slice.call(arguments); "
                  "return args.reduce(function(prev, curr) {return prev + curr})};"
@@ -6273,7 +6273,7 @@ static njs_unit_test_t  njs_test[] =
       nxt_string("SyntaxError: Invalid RegExp flags \"x\"") },
 
     { nxt_string("[0].map(RegExp().toString)"),
-      nxt_string("TypeError: 'this' argument is not a regexp") },
+      nxt_string("TypeError: \"this\" argument is not a regexp") },
 
     /* Non-standard ECMA-262 features. */
 
@@ -6403,7 +6403,7 @@ static njs_unit_test_t  njs_test[] =
     /* Memory object is immutable. */
 
     { nxt_string("var e = MemoryError('e'); e.name = 'E'"),
-      nxt_string("TypeError: Cannot add property 'name', object is not extensible") },
+      nxt_string("TypeError: Cannot add property \"name\", object is not extensible") },
 
     { nxt_string("EvalError.prototype.name"),
       nxt_string("EvalError") },
@@ -6564,10 +6564,10 @@ static njs_unit_test_t  njs_test[] =
       nxt_string("SyntaxError: Unexpected token \"null\" in 1") },
 
     { nxt_string("'a'.f()"),
-      nxt_string("TypeError: 'f' is not a function") },
+      nxt_string("TypeError: \"f\" is not a function") },
 
     { nxt_string("1..f()"),
-      nxt_string("TypeError: 'f' is not a function") },
+      nxt_string("TypeError: \"f\" is not a function") },
 
     { nxt_string("try {}"),
       nxt_string("SyntaxError: Missing catch or finally after try in 1") },
@@ -7002,13 +7002,13 @@ static njs_unit_test_t  njs_test[] =
       nxt_string("1") },
 
     { nxt_string("this.undefined = 42"),
-      nxt_string("TypeError: Cannot assign to read-only property 'undefined' of object") },
+      nxt_string("TypeError: Cannot assign to read-only property \"undefined\" of object") },
 
     { nxt_string("this.Infinity = 42"),
-      nxt_string("TypeError: Cannot assign to read-only property 'Infinity' of object") },
+      nxt_string("TypeError: Cannot assign to read-only property \"Infinity\" of object") },
 
     { nxt_string("this.NaN = 42"),
-      nxt_string("TypeError: Cannot assign to read-only property 'NaN' of object") },
+      nxt_string("TypeError: Cannot assign to read-only property \"NaN\" of object") },
 
     { nxt_string("typeof this.undefined"),
       nxt_string("undefined") },
@@ -7077,7 +7077,7 @@ static njs_unit_test_t  njs_test[] =
       nxt_string("true") },
 
     { nxt_string("Object.prototype.__proto__.f()"),
-      nxt_string("TypeError: cannot get property 'f' of undefined") },
+      nxt_string("TypeError: cannot get property \"f\" of undefined") },
 
     { nxt_string("Object.prototype.toString.call(Object.prototype)"),
       nxt_string("[object Object]") },
@@ -7098,7 +7098,7 @@ static njs_unit_test_t  njs_test[] =
       nxt_string("true") },
 
     { nxt_string("({}).__proto__ = 1"),
-      nxt_string("TypeError: Cannot assign to read-only property '__proto__' of object") },
+      nxt_string("TypeError: Cannot assign to read-only property \"__proto__\" of object") },
 
     { nxt_string("({}).__proto__.constructor === Object"),
       nxt_string("true") },
@@ -7504,7 +7504,7 @@ static njs_unit_test_t  njs_test[] =
       nxt_string("β") },
 
     { nxt_string("var s = new String('αβ'); s[1] = 'b'"),
-      nxt_string("TypeError: Cannot assign to read-only property '1' of object string") },
+      nxt_string("TypeError: Cannot assign to read-only property \"1\" of object string") },
 
     { nxt_string("var s = new String('αβ'); s[4] = 'ab'; s[4]"),
       nxt_string("ab") },
@@ -7861,10 +7861,10 @@ static njs_unit_test_t  njs_test[] =
       nxt_string("a,1,c,3,b,2") },
 
     { nxt_string("var o = {}; Object.defineProperty(o, 'a', {}); o.a = 1"),
-      nxt_string("TypeError: Cannot assign to read-only property 'a' of object") },
+      nxt_string("TypeError: Cannot assign to read-only property \"a\" of object") },
 
     { nxt_string("var o = {}; Object.defineProperty(o, 'a', {writable:false}); o.a = 1"),
-      nxt_string("TypeError: Cannot assign to read-only property 'a' of object") },
+      nxt_string("TypeError: Cannot assign to read-only property \"a\" of object") },
 
     { nxt_string("var o = {}; Object.defineProperty(o, 'a', {writable:true});"
                  "o.a = 1; o.a"),
@@ -7872,7 +7872,7 @@ static njs_unit_test_t  njs_test[] =
 
     { nxt_string("var o = {};"
                  "Object.defineProperty(o, 'a', {value:1}); delete o.a"),
-      nxt_string("TypeError: Cannot delete property 'a' of object") },
+      nxt_string("TypeError: Cannot delete property \"a\" of object") },
 
     { nxt_string("var o = {};"
                  "Object.defineProperty(o, 'a', {value:1, configurable:true});"
@@ -7882,7 +7882,7 @@ static njs_unit_test_t  njs_test[] =
     { nxt_string("var o = {};"
                  "Object.defineProperty(o, 'a', {value:1, configurable:false});"
                  "delete o.a"),
-      nxt_string("TypeError: Cannot delete property 'a' of object") },
+      nxt_string("TypeError: Cannot delete property \"a\" of object") },
 
     { nxt_string("var o = {};"
                  "Object.defineProperty(o, 'a', Object.create({value:2})); o.a"),
@@ -7891,17 +7891,17 @@ static njs_unit_test_t  njs_test[] =
     { nxt_string("var o = {};"
                  "Object.defineProperty(o, 'a', {configurable:false});"
                  "Object.defineProperty(o, 'a', {configurable:true})"),
-      nxt_string("TypeError: Cannot redefine property: 'a'") },
+      nxt_string("TypeError: Cannot redefine property: \"a\"") },
 
     { nxt_string("var o = {};"
                  "Object.defineProperty(o, 'a', {configurable:false});"
                  "Object.defineProperty(o, 'a', {enumerable:true})"),
-      nxt_string("TypeError: Cannot redefine property: 'a'") },
+      nxt_string("TypeError: Cannot redefine property: \"a\"") },
 
     { nxt_string("var o = {};"
                  "Object.defineProperty(o, 'a', {configurable:false});"
                  "Object.defineProperty(o, 'a', {writable:true})"),
-      nxt_string("TypeError: Cannot redefine property: 'a'") },
+      nxt_string("TypeError: Cannot redefine property: \"a\"") },
 
     { nxt_string("var o = {};"
                  "Object.defineProperty(o, 'a', {configurable:false});"
@@ -7936,7 +7936,7 @@ static njs_unit_test_t  njs_test[] =
     { nxt_string("var o = {};"
                  "Object.defineProperty(o, 'a', {value:1});"
                  "Object.defineProperty(o, 'a', {value:2}).a"),
-      nxt_string("TypeError: Cannot redefine property: 'a'") },
+      nxt_string("TypeError: Cannot redefine property: \"a\"") },
 
     { nxt_string("var o = {};"
                  "Object.defineProperty(o, 'a', {configurable:true});"
@@ -7973,7 +7973,7 @@ static njs_unit_test_t  njs_test[] =
 
     { nxt_string("var o = {a:1}; delete o.a;"
                  "Object.defineProperty(o, 'a', { value: 1 }); o.a = 2; o.a"),
-      nxt_string("TypeError: Cannot assign to read-only property 'a' of object") },
+      nxt_string("TypeError: Cannot assign to read-only property \"a\" of object") },
 
     { nxt_string("var o = {a:1}; delete o.a;"
                  "Object.defineProperty(o, 'a', { value: 1, writable:1 }); o.a = 2; o.a"),
@@ -8227,16 +8227,16 @@ static njs_unit_test_t  njs_test[] =
       nxt_string("undefined") },
 
     { nxt_string("var o = Object.freeze({a:1}); o.a = 2"),
-      nxt_string("TypeError: Cannot assign to read-only property 'a' of object") },
+      nxt_string("TypeError: Cannot assign to read-only property \"a\" of object") },
 
     { nxt_string("var o = Object.freeze({a:1}); delete o.a"),
-      nxt_string("TypeError: Cannot delete property 'a' of object") },
+      nxt_string("TypeError: Cannot delete property \"a\" of object") },
 
     { nxt_string("var o = Object.freeze({a:1}); o.b = 1; o.b"),
-      nxt_string("TypeError: Cannot add property 'b', object is not extensible") },
+      nxt_string("TypeError: Cannot add property \"b\", object is not extensible") },
 
     { nxt_string("var o = Object.freeze(Object.create({a:1})); o.a = 2; o.a"),
-      nxt_string("TypeError: Cannot add property 'a', object is not extensible") },
+      nxt_string("TypeError: Cannot add property \"a\", object is not extensible") },
 
     { nxt_string("var o = Object.freeze({a:{b:1}}); o.a.b = 2; o.a.b"),
       nxt_string("2") },
@@ -8249,13 +8249,13 @@ static njs_unit_test_t  njs_test[] =
       nxt_string("TypeError: object is not extensible") },
 
     { nxt_string("var a = [1,2]; a.a = 1; Object.freeze(a); delete a.a"),
-      nxt_string("TypeError: Cannot delete property 'a' of array") },
+      nxt_string("TypeError: Cannot delete property \"a\" of array") },
 
     { nxt_string("var a = [1,2]; a.a = 1; Object.freeze(a); a.a = 2"),
-      nxt_string("TypeError: Cannot assign to read-only property 'a' of array") },
+      nxt_string("TypeError: Cannot assign to read-only property \"a\" of array") },
 
     { nxt_string("var a = Object.freeze([1,2]); a.a = 1"),
-      nxt_string("TypeError: Cannot add property 'a', object is not extensible") },
+      nxt_string("TypeError: Cannot add property \"a\", object is not extensible") },
 
     { nxt_string("Object.defineProperty(function() {}, 'a', {value:1}).a"),
       nxt_string("1") },
@@ -8265,13 +8265,13 @@ static njs_unit_test_t  njs_test[] =
       nxt_string("TypeError: object is not extensible") },
 
     { nxt_string("var f = function() {}; f.a = 1; Object.freeze(f); delete f.a"),
-      nxt_string("TypeError: Cannot delete property 'a' of function") },
+      nxt_string("TypeError: Cannot delete property \"a\" of function") },
 
     { nxt_string("var f = function() {}; f.a = 1; Object.freeze(f); f.a = 2"),
-      nxt_string("TypeError: Cannot assign to read-only property 'a' of function") },
+      nxt_string("TypeError: Cannot assign to read-only property \"a\" of function") },
 
     { nxt_string("var f = Object.freeze(function() {}); f.a = 1"),
-      nxt_string("TypeError: Cannot add property 'a', object is not extensible") },
+      nxt_string("TypeError: Cannot add property \"a\", object is not extensible") },
 
     { nxt_string("Object.defineProperty(new Date(''), 'a', {value:1}).a"),
       nxt_string("1") },
@@ -8282,13 +8282,13 @@ static njs_unit_test_t  njs_test[] =
 
     { nxt_string("var d = new Date(''); d.a = 1; Object.freeze(d);"
                  "delete d.a"),
-      nxt_string("TypeError: Cannot delete property 'a' of date") },
+      nxt_string("TypeError: Cannot delete property \"a\" of date") },
 
     { nxt_string("var d = new Date(''); d.a = 1; Object.freeze(d); d.a = 2"),
-      nxt_string("TypeError: Cannot assign to read-only property 'a' of date") },
+      nxt_string("TypeError: Cannot assign to read-only property \"a\" of date") },
 
     { nxt_string("var d = Object.freeze(new Date('')); d.a = 1"),
-      nxt_string("TypeError: Cannot add property 'a', object is not extensible") },
+      nxt_string("TypeError: Cannot add property \"a\", object is not extensible") },
 
     { nxt_string("Object.defineProperty(new RegExp(''), 'a', {value:1}).a"),
       nxt_string("1") },
@@ -8298,13 +8298,13 @@ static njs_unit_test_t  njs_test[] =
       nxt_string("TypeError: object is not extensible") },
 
     { nxt_string("var r = new RegExp(''); r.a = 1; Object.freeze(r); delete r.a"),
-      nxt_string("TypeError: Cannot delete property 'a' of regexp") },
+      nxt_string("TypeError: Cannot delete property \"a\" of regexp") },
 
     { nxt_string("var r = new RegExp(''); r.a = 1; Object.freeze(r); r.a = 2"),
-      nxt_string("TypeError: Cannot assign to read-only property 'a' of regexp") },
+      nxt_string("TypeError: Cannot assign to read-only property \"a\" of regexp") },
 
     { nxt_string("var r = Object.freeze(new RegExp('')); r.a = 1"),
-      nxt_string("TypeError: Cannot add property 'a', object is not extensible") },
+      nxt_string("TypeError: Cannot add property \"a\", object is not extensible") },
 
     { nxt_string("Object.isFrozen({a:1})"),
       nxt_string("false") },
@@ -8364,13 +8364,13 @@ static njs_unit_test_t  njs_test[] =
       nxt_string("2") },
 
     { nxt_string("var o = Object.seal({a:1}); delete o.a"),
-      nxt_string("TypeError: Cannot delete property 'a' of object") },
+      nxt_string("TypeError: Cannot delete property \"a\" of object") },
 
     { nxt_string("var o = Object.seal({a:1}); o.b = 1; o.b"),
-      nxt_string("TypeError: Cannot add property 'b', object is not extensible") },
+      nxt_string("TypeError: Cannot add property \"b\", object is not extensible") },
 
     { nxt_string("var o = Object.seal(Object.create({a:1})); o.a = 2; o.a"),
-      nxt_string("TypeError: Cannot add property 'a', object is not extensible") },
+      nxt_string("TypeError: Cannot add property \"a\", object is not extensible") },
 
     { nxt_string("var o = Object.seal({a:{b:1}}); o.a.b = 2; o.a.b"),
       nxt_string("2") },
@@ -8453,7 +8453,7 @@ static njs_unit_test_t  njs_test[] =
       nxt_string("undefined") },
 
     { nxt_string("var o = Object.preventExtensions({a:1}); o.b = 1; o.b"),
-      nxt_string("TypeError: Cannot add property 'b', object is not extensible") },
+      nxt_string("TypeError: Cannot add property \"b\", object is not extensible") },
 
     { nxt_string("Object.preventExtensions()"),
       nxt_string("undefined") },
@@ -10296,7 +10296,7 @@ static njs_unit_test_t  njs_test[] =
 
     { nxt_string("var o = JSON.parse('{\"a\":1}', "
                  "                   function(k, v) {return v.a.a;}); o"),
-      nxt_string("TypeError: cannot get property 'a' of undefined") },
+      nxt_string("TypeError: cannot get property \"a\" of undefined") },
 
     /* JSON.stringify() */
 
@@ -10630,7 +10630,7 @@ static njs_unit_test_t  njs_test[] =
     /* require(). */
 
     { nxt_string("require('unknown_module')"),
-      nxt_string("Error: Cannot find module 'unknown_module'") },
+      nxt_string("Error: Cannot find module \"unknown_module\"") },
 
     { nxt_string("require()"),
       nxt_string("TypeError: missing path") },
@@ -10658,15 +10658,15 @@ static njs_unit_test_t  njs_test[] =
 
     { nxt_string("var fs = require('fs');"
                  "fs.readFile('/njs_unknown_path', {flag:'xx'}, function () {})"),
-      nxt_string("TypeError: Unknown file open flags: 'xx'") },
+      nxt_string("TypeError: Unknown file open flags: \"xx\"") },
 
     { nxt_string("var fs = require('fs');"
                  "fs.readFile('/njs_unknown_path', {encoding:'ascii'}, function () {})"),
-      nxt_string("TypeError: Unknown encoding: 'ascii'") },
+      nxt_string("TypeError: Unknown encoding: \"ascii\"") },
 
     { nxt_string("var fs = require('fs');"
                  "fs.readFile('/njs_unknown_path', 'ascii', function () {})"),
-      nxt_string("TypeError: Unknown encoding: 'ascii'") },
+      nxt_string("TypeError: Unknown encoding: \"ascii\"") },
 
     /* require('fs').readFileSync() */
 
@@ -10680,15 +10680,15 @@ static njs_unit_test_t  njs_test[] =
 
     { nxt_string("var fs = require('fs');"
                  "fs.readFileSync('/njs_unknown_path', {flag:'xx'})"),
-      nxt_string("TypeError: Unknown file open flags: 'xx'") },
+      nxt_string("TypeError: Unknown file open flags: \"xx\"") },
 
     { nxt_string("var fs = require('fs');"
                  "fs.readFileSync('/njs_unknown_path', {encoding:'ascii'})"),
-      nxt_string("TypeError: Unknown encoding: 'ascii'") },
+      nxt_string("TypeError: Unknown encoding: \"ascii\"") },
 
     { nxt_string("var fs = require('fs');"
                  "fs.readFileSync('/njs_unknown_path', 'ascii')"),
-      nxt_string("TypeError: Unknown encoding: 'ascii'") },
+      nxt_string("TypeError: Unknown encoding: \"ascii\"") },
 
     { nxt_string("var fs = require('fs');"
                  "fs.readFileSync('/njs_unknown_path', true)"),
@@ -10719,15 +10719,15 @@ static njs_unit_test_t  njs_test[] =
 
     { nxt_string("var fs = require('fs');"
                  "fs.writeFile('/njs_unknown_path', '', {flag:'xx'}, function () {})"),
-      nxt_string("TypeError: Unknown file open flags: 'xx'") },
+      nxt_string("TypeError: Unknown file open flags: \"xx\"") },
 
     { nxt_string("var fs = require('fs');"
                  "fs.writeFile('/njs_unknown_path', '', {encoding:'ascii'}, function () {})"),
-      nxt_string("TypeError: Unknown encoding: 'ascii'") },
+      nxt_string("TypeError: Unknown encoding: \"ascii\"") },
 
     { nxt_string("var fs = require('fs');"
                  "fs.writeFile('/njs_unknown_path', '', 'ascii', function () {})"),
-      nxt_string("TypeError: Unknown encoding: 'ascii'") },
+      nxt_string("TypeError: Unknown encoding: \"ascii\"") },


More information about the nginx-devel mailing list