MCPcopy Create free account
hub / github.com/nodejs/node / test_regexp

Function test_regexp

deps/v8/test/mjsunit/whitespaces.js:51–63  ·  view source on GitHub ↗
(str)

Source from the content-addressed store, hash-verified

49}
50
51function test_regexp(str) {
52 var pos_match = str.match(/\s/);
53 var neg_match = str.match(/\S/);
54 var test_char = str[0];
55 var postfix = str[1];
56 if (is_whitespace(test_char)) {
57 assertEquals(test_char, pos_match[0]);
58 assertEquals(postfix, neg_match[0]);
59 } else {
60 assertEquals(test_char, neg_match[0]);
61 assertNull(pos_match);
62 }
63}
64
65function test_trim(c, infix) {
66 var str = c + c + c + infix + c;

Callers 1

testCodePointRangeFunction · 0.85

Calls 3

is_whitespaceFunction · 0.85
matchMethod · 0.65
assertEqualsFunction · 0.50

Tested by

no test coverage detected