2011-09-07 08:35:18 +02:00
|
|
|
// Copyright 2009 the Sputnik authors. All rights reserved.
|
|
|
|
// This code is governed by the BSD license found in the LICENSE file.
|
|
|
|
|
2014-07-22 01:09:02 +02:00
|
|
|
/*---
|
2018-01-05 18:26:51 +01:00
|
|
|
info: |
|
2014-07-22 01:09:02 +02:00
|
|
|
The production CharacterClassEscape :: S evaluates by returning
|
|
|
|
the set of all characters not included in the set returned by
|
|
|
|
CharacterClassEscape :: s
|
2014-07-25 00:41:42 +02:00
|
|
|
es5id: 15.10.2.12_A2_T5
|
2014-07-22 01:09:02 +02:00
|
|
|
description: >
|
|
|
|
Tested string is
|
|
|
|
"0123456789_abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ~`!@#$%^&*()-+={[}]|\\:;'<,>./?"
|
|
|
|
+ '"'
|
|
|
|
---*/
|
2011-09-07 08:35:18 +02:00
|
|
|
|
|
|
|
//CHECK#1
|
|
|
|
var non_s = "0123456789_abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ~`!@#$%^&*()-+={[}]|\\:;'<,>./?" + '"';
|
|
|
|
var regexp_S = /\S/g;
|
|
|
|
var k = 0;
|
|
|
|
while (regexp_S.exec(non_s) !== null) {
|
2018-02-09 18:09:47 +01:00
|
|
|
k++;
|
2011-09-07 08:35:18 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
if (non_s.length !== k) {
|
2018-02-09 18:09:47 +01:00
|
|
|
$ERROR('#1: non-s');
|
|
|
|
}
|
2011-09-07 08:35:18 +02:00
|
|
|
|
|
|
|
//CHECK#2
|
|
|
|
var non_S = '\f\n\r\t\v ';
|
|
|
|
if (/\S/.exec(non_S) !== null) {
|
2018-02-09 18:09:47 +01:00
|
|
|
$ERROR('#2: non-S');
|
2011-09-07 08:35:18 +02:00
|
|
|
}
|