added test to check if the string matches exactly

pull/18182/head
Xiangyun Chi 2016-01-07 12:10:53 +00:00 committed by Berkeley Martinez
parent faca93d1f5
commit 4504cab299
1 changed files with 2 additions and 1 deletions

View File

@ -816,7 +816,8 @@
"var myStr = \"I am a \\\"double quoted\\\" string inside \\\"double quotes\\\"\";"
],
"tests": [
"assert(code.match(/\\\\\"/g).length === 4 && code.match(/[^\\\\]\"/g).length === 2, 'message: You should use two double quotes (<code>&quot;</code>) and four escaped double quotes (<code>&#92;&quot;</code>) ');"
"assert(code.match(/\\\\\"/g).length === 4 && code.match(/[^\\\\]\"/g).length === 2, 'message: You should use two double quotes (<code>&quot;</code>) and four escaped double quotes (<code>&#92;&quot;</code>) ');",
"assert(myStr === \"I am a \\\"double quoted\\\" string inside \\\"double quotes\\\"\", 'message: Variable myStr should equal to (<code>\"I am a \"double quoted\" string inside \"double quotes\"\"</code>).');"
],
"type": "waypoint",
"challengeType": 1