Fix character code values for "<LF>" and "<CR>" characters in ecma-char helpers.
JerryScript-DCO-1.0-Signed-off-by: Ruben Ayrapetyan r.ayrapetyan@samsung.com
This commit is contained in:
committed by
Evgeny Gavrin
parent
3d31bfec92
commit
9e3f123cd5
@@ -32,7 +32,7 @@
|
||||
bool
|
||||
ecma_char_is_new_line (ecma_char_t c) /**< character value */
|
||||
{
|
||||
return (c == '\x0D');
|
||||
return (c == '\x0A');
|
||||
} /* ecma_char_is_new_line */
|
||||
|
||||
/**
|
||||
@@ -44,7 +44,7 @@ ecma_char_is_new_line (ecma_char_t c) /**< character value */
|
||||
bool
|
||||
ecma_char_is_carriage_return (ecma_char_t c) /**< character value */
|
||||
{
|
||||
return (c == '\x0A');
|
||||
return (c == '\x0D');
|
||||
} /* ecma_char_is_carriage_return */
|
||||
|
||||
/**
|
||||
|
||||
@@ -0,0 +1,17 @@
|
||||
// Copyright 2015 Samsung Electronics Co., Ltd.
|
||||
//
|
||||
// Licensed under the Apache License, Version 2.0 (the "License");
|
||||
// you may not use this file except in compliance with the License.
|
||||
// You may obtain a copy of the License at
|
||||
//
|
||||
// http://www.apache.org/licenses/LICENSE-2.0
|
||||
//
|
||||
// Unless required by applicable law or agreed to in writing, software
|
||||
// distributed under the License is distributed on an "AS IS" BASIS
|
||||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
|
||||
assert (eval ("'1\\\r\n2'") === '12');
|
||||
|
||||
assert (eval ("'1\\\n2'") === '12');
|
||||
Reference in New Issue
Block a user