Merge pull request #37 from nijel/test

Use single quotes around JSON data to reduce need for escaping
This commit is contained in:
Evgeniy Dushistov
2017-11-09 18:39:34 +03:00
committed by GitHub

View File

@@ -18,8 +18,8 @@ test_json() {
fi fi
} }
test_json "[{\"name\": \"Test synonyms\", \"wordcount\": \"2\"},{\"name\": \"Sample 1 test dictionary\", \"wordcount\": \"1\"},{\"name\": \"test_dict\", \"wordcount\": \"1\"}]" -x -j -l -n --data-dir "$TEST_DIR" test_json '[{"name": "Test synonyms", "wordcount": "2"},{"name": "Sample 1 test dictionary", "wordcount": "1"},{"name": "test_dict", "wordcount": "1"}]' -x -j -l -n --data-dir "$TEST_DIR"
test_json "[{\"dict\": \"Test synonyms\",\"word\":\"test\",\"definition\":\"\\\nresult of test\"}]" -x -j -n --data-dir "$TEST_DIR" foo test_json '[{"dict": "Test synonyms","word":"test","definition":"\u000aresult of test"}]' -x -j -n --data-dir "$TEST_DIR" foo
test_json "[]" -x -j -n --data-dir "$TEST_DIR" foobarbaaz test_json '[]' -x -j -n --data-dir "$TEST_DIR" foobarbaaz
exit 0 exit 0