Mike Pennisi 14cb6ca88e Extend tests for LineTerminatorSequence
Add assertions for the "Line Separtator" and "Paragraph Separator" line
terminator code points.
2015-04-15 10:50:44 -04:00

37 lines
1.0 KiB
JavaScript
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

// Copyright (C) Copyright 2014 the V8 project authors. All rights reserved.
// This code is governed by the BSD license found in the LICENSE file.
/*---
es6id: 11.8.6
description: >
The TRV of LineTerminatorSequence :: <LF> is the code unit value 0x000A.
The TRV of LineTerminatorSequence :: <CR> is the code unit value 0x000A.
The TRV of LineTerminatorSequence :: <LS> is the code unit value 0x2028.
The TRV of LineTerminatorSequence :: <PS> is the code unit value 0x2029.
The TRV of LineTerminatorSequence :: <CR><LF> is the sequence consisting of
the code unit value 0x000A.
---*/
var calls;
calls = 0;
(function(s) {
calls++;
assert.sameValue(s.raw[0], '\n\n\n', 'Line Feed and Carriage Return');
})`
`;
assert.sameValue(calls, 1);
calls = 0;
(function(cs) {
calls++;
assert.sameValue(cs.raw[0], '\u2028', 'Line Separator');
})``
assert.sameValue(calls, 1);
calls = 0;
(function(cs) {
calls++;
assert.sameValue(cs.raw[0], '\u2029', 'Paragraph Separator');
})``
assert.sameValue(calls, 1);