Skip to content

Commit 9d20e1a

Browse files
authored
add trailing newlines to all test files (#43)
1 parent 60916b2 commit 9d20e1a

66 files changed

Lines changed: 73 additions & 143 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

tests/HJSONParserTest.php

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,14 @@ class HJSONParserTest
1717
public function assertEquals($a, $b)
1818
{
1919
if ($a !== $b) {
20+
// for ($i=0; $i<strlen($a); $i++) {
21+
// echo ord($a[$i]).' ';
22+
// }
23+
// echo "\n";
24+
// for ($i=0; $i<strlen($b); $i++) {
25+
// echo ord($b[$i]).' ';
26+
// }
27+
2028
echo "\n\n";
2129
$a2 = preg_split('/\r\n|\r|\n/', $a);
2230
$b2 = preg_split('/\r\n|\r|\n/', $b);
@@ -93,7 +101,7 @@ private function runEach($name, $file, $isJson, $inputCr, $outputCr)
93101
'eol' => $outputCr ? "\r\n" : "\n",
94102
'emitRootBraces' => true,
95103
'space' => 2
96-
]);
104+
]).($outputCr ? "\r" : "")."\n";
97105
$result = json_decode($this->load("{$name}_result.json", $inputCr));
98106
$text2 = json_encode($result, JSON_PRETTY_PRINT | JSON_UNESCAPED_SLASHES);
99107
$this->assertEquals($text1, $text2);

tests/assets/charset_result.hjson

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,4 +2,4 @@
22
ql-ascii: ! "#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~ÄäÅåÖöÉé
33
js-ascii: ! "#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~ÄäÅåÖöÉé
44
ml-ascii: ! "#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~ÄäÅåÖöÉé
5-
}
5+
}

tests/assets/charset_result.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,4 +2,4 @@
22
"ql-ascii": "! \"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\]^_`abcdefghijklmnopqrstuvwxyz{|}~ÄäÅåÖöÉé",
33
"js-ascii": "! \"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\]^_`abcdefghijklmnopqrstuvwxyz{|}~ÄäÅåÖöÉé",
44
"ml-ascii": "! \"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\]^_`abcdefghijklmnopqrstuvwxyz{|}~ÄäÅåÖöÉé"
5-
}
5+
}

tests/assets/comments_result.hjson

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,4 +23,4 @@
2323
str1: 00 # part of the string
2424
str2: 00.0 // part of the string
2525
str3: 02 /* part of the string */
26-
}
26+
}

tests/assets/comments_result.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,4 +23,4 @@
2323
"str1": "00 # part of the string",
2424
"str2": "00.0 // part of the string",
2525
"str3": "02 /* part of the string */"
26-
}
26+
}

tests/assets/empty_result.hjson

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
{
22
"": empty
3-
}
3+
}

tests/assets/empty_result.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
{
22
"": "empty"
3-
}
3+
}

tests/assets/failJSON02_test.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
["Unclosed array"
1+
["Unclosed array"

tests/assets/failJSON05_test.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
["double extra comma",,]
1+
["double extra comma",,]

tests/assets/failJSON06_test.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
[ , "<-- missing value"]
1+
[ , "<-- missing value"]

0 commit comments

Comments
 (0)