1// Copyright JS Foundation and other contributors, http://js.foundation 2// 3// Licensed under the Apache License, Version 2.0 (the "License"); 4// you may not use this file except in compliance with the License. 5// You may obtain a copy of the License at 6// 7// http://www.apache.org/licenses/LICENSE-2.0 8// 9// Unless required by applicable law or agreed to in writing, software 10// distributed under the License is distributed on an "AS IS" BASIS 11// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12// See the License for the specific language governing permissions and 13// limitations under the License. 14 15assert ('abcd\ 16efgh' === 'abcdefgh'); 17 18assert ('\'' === "'"); 19assert ("\'" === "'"); 20assert ('\"' === '"'); 21assert ("\"" === '"'); 22 23assert ((new String ('\\')).length === 1); 24assert ((new String ('\b')).length === 1); 25assert ((new String ('\f')).length === 1); 26assert ((new String ('\n')).length === 1); 27assert ((new String ('\r')).length === 1); 28assert ((new String ('\t')).length === 1); 29assert ((new String ('\v')).length === 1); 30 31/* verifying character codes */ 32assert ((new String ('\\')).charCodeAt (0) === 92); 33assert ((new String ('\b')).charCodeAt (0) === 8); 34assert ((new String ('\f')).charCodeAt (0) === 12); 35assert ((new String ('\n')).charCodeAt (0) === 10); 36assert ((new String ('\r')).charCodeAt (0) === 13); 37assert ((new String ('\t')).charCodeAt (0) === 9); 38assert ((new String ('\v')).charCodeAt (0) === 11); 39 40/* 'p' is not SingleEscapeCharacter */ 41assert ('\p' === 'p'); 42 43var v\u0061riable = 'valu\u0065'; 44assert (variable === 'value'); 45