Skip to content

Commit 9c8cda7

Browse files
committed
upd tests
1 parent 5561bfd commit 9c8cda7

4 files changed

Lines changed: 11 additions & 1 deletion

File tree

assets/failKey5_test.hjson

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
{
2+
# invalid name
3+
'''foo''': 0
4+
}

assets/failStr8a_test.hjson

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
{
2+
# invalid ml-string
3+
foo : ""'text'''
4+
}

assets/testlist.txt

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,7 @@ failKey1_test.hjson
3232
failKey2_test.hjson
3333
failKey3_test.hjson
3434
failKey4_test.hjson
35+
failKey5_test.hjson
3536
failMLStr1_test.hjson
3637
failObj1_test.hjson
3738
failObj2_test.hjson
@@ -61,6 +62,7 @@ failStr6b_test.hjson
6162
failStr6c_test.hjson
6263
failStr6d_test.hjson
6364
failStr7a_test.hjson
65+
failStr8a_test.hjson
6466
kan_test.hjson
6567
keys_test.hjson
6668
mltabs_test.json

src/main/org/hjson/HjsonParser.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -295,7 +295,7 @@ private String readStringInternal(boolean allowML) throws IOException {
295295
String string=endCapture();
296296
read();
297297

298-
if (allowML && current=='\'' && string.length()==0) {
298+
if (allowML && exitCh=='\'' && current=='\'' && string.length()==0) {
299299
// ''' indicates a multiline string
300300
read();
301301
return readMlString();

0 commit comments

Comments
 (0)