[njs] Added additional RegExp tests.

Dmitry Volyntsev xeioex at nginx.com
Thu Feb 28 17:35:08 UTC 2019


details:   https://hg.nginx.org/njs/rev/195158f4a6a7
branches:  
changeset: 815:195158f4a6a7
user:      Dmitry Volyntsev <xeioex at nginx.com>
date:      Thu Feb 28 20:34:47 2019 +0300
description:
Added additional RegExp tests.

diffstat:

 njs/test/njs_unit_test.c |  6 ++++++
 1 files changed, 6 insertions(+), 0 deletions(-)

diffs (16 lines):

diff -r 33c663d84114 -r 195158f4a6a7 njs/test/njs_unit_test.c
--- a/njs/test/njs_unit_test.c	Thu Feb 28 19:30:32 2019 +0300
+++ b/njs/test/njs_unit_test.c	Thu Feb 28 20:34:47 2019 +0300
@@ -6627,6 +6627,12 @@ static njs_unit_test_t  njs_test[] =
     { nxt_string("var r = /LS/i.exec(false); r[0]"),
       nxt_string("ls") },
 
+    { nxt_string("var r = (/^.+$/mg), s = 'ab\\nc'; [r.exec(s), r.exec(s)]"),
+      nxt_string("ab,c") },
+
+    { nxt_string("var r = (/^.+$/mg); [r.global, r.multiline, r.ignoreCase]"),
+      nxt_string("true,true,false") },
+
     { nxt_string("var r = /./; r"),
       nxt_string("/./") },
 


More information about the nginx-devel mailing list