summaryrefslogtreecommitdiff
path: root/test/test_fuzzy_json_decode.vader
diff options
context:
space:
mode:
Diffstat (limited to 'test/test_fuzzy_json_decode.vader')
-rw-r--r--test/test_fuzzy_json_decode.vader8
1 files changed, 8 insertions, 0 deletions
diff --git a/test/test_fuzzy_json_decode.vader b/test/test_fuzzy_json_decode.vader
index 4ac0ca1b..4b1c6088 100644
--- a/test/test_fuzzy_json_decode.vader
+++ b/test/test_fuzzy_json_decode.vader
@@ -6,6 +6,14 @@ Execute(FuzzyJSONDecode should return the default for empty Strings):
AssertEqual [], ale#util#FuzzyJSONDecode('', [])
AssertEqual {}, ale#util#FuzzyJSONDecode('', {})
+Execute(FuzzyJSONDecode should return the default value for ['']):
+ AssertEqual [], ale#util#FuzzyJSONDecode([''], [])
+ AssertEqual {}, ale#util#FuzzyJSONDecode([''], {})
+
+Execute(FuzzyJSONDecode should return the default value for only whitespace lines):
+ AssertEqual [], ale#util#FuzzyJSONDecode(['', "\n"], [])
+ AssertEqual {}, ale#util#FuzzyJSONDecode(['', "\n"], {})
+
Execute(FuzzyJSONDecode should return the default for Lists with invalid JSON):
AssertEqual [], ale#util#FuzzyJSONDecode(['x'], [])
AssertEqual {}, ale#util#FuzzyJSONDecode(['x'], {})