Skip to content

Commit 1fbec01

Browse files
committed
Added tests with unicode/UCS4 characters and UTF8 encoded json files
1 parent 5bb3388 commit 1fbec01

File tree

6 files changed

+380
-2
lines changed

6 files changed

+380
-2
lines changed

.travis.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,14 +13,14 @@ env:
1313
matrix:
1414
# CMake build with unit tests, no documentation, no coverage analysis
1515
# Allow to fail for now until tests are fixed
16-
- BUILD_SCRIPT="mkdir cmake-build && cd cmake-build && cmake -DSKIP_DOC_GEN:BOOL=TRUE .. && make -j 4 && make test"
16+
- BUILD_SCRIPT="mkdir cmake-build && cd cmake-build && cmake -DSKIP_DOC_GEN:BOOL=TRUE -DENABLE_UNICODE:BOOL=TRUE .. && make -j 4 && make test"
1717
SPECIFIC_DEPENDS="cmake nodejs"
1818
JLINT="yes"
1919
DOCS="no"
2020
FoBiS="no"
2121

2222
# build with build.sh, make documentation, run unit tests and perform coverage analysis
23-
- BUILD_SCRIPT="./build.sh"
23+
- BUILD_SCRIPT="./build.sh --coverage --enable-unicode"
2424
SPECIFIC_DEPENDS="binutils"
2525
JLINT="no"
2626
DOCS="yes"
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
../inputs/hello-world-ascii.json
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
../inputs/hello-world-ucs4.json

files/inputs/hello-world-ascii.json

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
{
2+
"hello world": {
3+
"Chinese": "\u4f60\u597d\u4e16\u754c",
4+
"Dutch": "Hello wereld",
5+
"English": "Hello world",
6+
"French": "Bonjour monde",
7+
"German": "Hallo Welt",
8+
"Greek": "\u03b3\u03b5\u03b9\u03ac \u03c3\u03bf\u03c5 \u03ba\u03cc\u03c3\u03bc\u03bf\u03c2",
9+
"Italian": "Ciao mondo",
10+
"Japanese": "\u3053\u3093\u306b\u3061\u306f\u4e16\u754c",
11+
"Korean": "\uc5ec\ubcf4\uc138\uc694 \uc138\uacc4",
12+
"Portuguese": "Ol\u00e1 mundo",
13+
"Russian": "\u0417\u0434\u0440\u0430\u0432\u0441\u0442\u0432\u0443\u043b\u0442\u0435 \u043c\u0438\u0440",
14+
"Spanish": "Hola mundo",
15+
"Amharic": "\u1235\u120b\u121d \u12a0\u1208\u121d",
16+
"Hebrew": "\u05e9\u05dc\u05d5\u05dd \u05e2\u05d5\u05dc\u05dd",
17+
"Hindi": "\u0939\u0948\u0932\u094b \u0935\u0930\u094d\u0932\u094d\u0921",
18+
"Arabic": "\u0645\u0631\u062d\u0628\u0627 \u0628\u0627\u0644\u0639\u0627\u0644\u0645",
19+
"Urdu": "\u06c1\u06cc\u0644\u0648 \u062f\u0646\u06cc\u0627",
20+
"Thai": "\u0e2a\u0e27\u0e31\u0e2a\u0e14\u0e35\u0e0a\u0e32\u0e27\u0e42\u0e25\u0e01"
21+
},
22+
"UCS4 support?": "\u2713"
23+
}

files/inputs/hello-world-ucs4.json

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
{
2+
"hello world": {
3+
"Chinese": "你好世界",
4+
"Dutch": "Hello wereld",
5+
"English": "Hello world",
6+
"French": "Bonjour monde",
7+
"German": "Hallo Welt",
8+
"Greek": "γειά σου κόσμος",
9+
"Italian": "Ciao mondo",
10+
"Japanese": "こんにちは世界",
11+
"Korean": "여보세요 세계",
12+
"Portuguese": "Olá mundo",
13+
"Russian": "Здравствулте мир",
14+
"Spanish": "Hola mundo",
15+
"Amharic": "ስላም አለም",
16+
"Hebrew": "שלום עולם",
17+
"Hindi": "हैलो वर्ल्ड",
18+
"Arabic": "مرحبا بالعالم",
19+
"Urdu": "ہیلو دنیا",
20+
"Thai": "สวัสดีชาวโลก"
21+
},
22+
"UCS4 support?": ""
23+
}

0 commit comments

Comments
 (0)