Skip to content

Commit 5561bfd

Browse files
committed
upd tests/check
1 parent 29071df commit 5561bfd

5 files changed

Lines changed: 12 additions & 3 deletions

File tree

assets/keys_result.hjson

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,9 @@
1818
"foo\"bar": test
1919
"'''": test
2020
"foo'''bar": test
21+
"'": test
22+
"'foo": test
23+
"foo'bar": test
2124
":": test
2225
"foo:bar": test
2326
"{": test

assets/keys_result.json

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,9 @@
1818
"foo\"bar": "test",
1919
"'''": "test",
2020
"foo'''bar": "test",
21+
"'": "test",
22+
"'foo": "test",
23+
"foo'bar": "test",
2124
":": "test",
2225
"foo:bar": "test",
2326
"{": "test",

assets/keys_test.hjson

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,9 @@
2222
"foo\"bar": test
2323
"'''": test
2424
"foo'''bar": test
25+
"'": test
26+
"'foo": test
27+
"foo'bar": test
2528
# control char in key name
2629
":": test
2730
"foo:bar": test

src/main/org/hjson/HjsonParser.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
/*******************************************************************************
22
* Copyright (c) 2013, 2015 EclipseSource.
3-
* Copyright (c) 2015-2016 Christian Zangl
3+
* Copyright (c) 2015-2017 Christian Zangl
44
*
55
* Permission is hereby granted, free of charge, to any person obtaining a copy
66
* of this software and associated documentation files (the "Software"), to deal

src/main/org/hjson/HjsonWriter.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*******************************************************************************
2-
* Copyright (c) 2015-2016 Christian Zangl
2+
* Copyright (c) 2015-2017 Christian Zangl
33
*
44
* Permission is hereby granted, free of charge, to any person obtaining a copy
55
* of this software and associated documentation files (the "Software"), to deal
@@ -30,7 +30,7 @@ class HjsonWriter {
3030

3131
private IHjsonDsfProvider[] dsfProviders;
3232

33-
static Pattern needsEscapeName=Pattern.compile("[,\\{\\[\\}\\]\\s:#\"']|//|/\\*|'''");
33+
static Pattern needsEscapeName=Pattern.compile("[,\\{\\[\\}\\]\\s:#\"']|//|/\\*");
3434

3535
public HjsonWriter(HjsonOptions options) {
3636
if (options!=null) {

0 commit comments

Comments
 (0)