]> git.madduck.net Git - etc/vim.git/blob - .vim/bundle/ale/test/test_fuzzy_json_decode.vader

madduck's git repository

Every one of the projects in this repository is available at the canonical URL git://git.madduck.net/madduck/pub/<projectpath> — see each project's metadata for the exact URL.

All patches and comments are welcome. Please squash your changes to logical commits before using git-format-patch and git-send-email to patches@git.madduck.net. If you'd read over the Git project's submission guidelines and adhered to them, I'd be especially grateful.

SSH access, as well as push access can be individually arranged.

If you use my repositories frequently, consider adding the following snippet to ~/.gitconfig and using the third clone URL listed for each project:

[url "git://git.madduck.net/madduck/"]
  insteadOf = madduck:

Merge commit '76265755a1add77121c8f9dabb3e9bb70fe9a972' as '.vim/bundle/ale'
[etc/vim.git] / .vim / bundle / ale / test / test_fuzzy_json_decode.vader
1 Execute(FuzzyJSONDecode should return the default for empty Lists):
2   AssertEqual [], ale#util#FuzzyJSONDecode([], [])
3   AssertEqual {}, ale#util#FuzzyJSONDecode([], {})
4
5 Execute(FuzzyJSONDecode should return the default for empty Strings):
6   AssertEqual [], ale#util#FuzzyJSONDecode('', [])
7   AssertEqual {}, ale#util#FuzzyJSONDecode('', {})
8
9 Execute(FuzzyJSONDecode should return the default value for ['']):
10   AssertEqual [], ale#util#FuzzyJSONDecode([''], [])
11   AssertEqual {}, ale#util#FuzzyJSONDecode([''], {})
12
13 Execute(FuzzyJSONDecode should return the default value for only whitespace lines):
14   AssertEqual [], ale#util#FuzzyJSONDecode(['', "\n"], [])
15   AssertEqual {}, ale#util#FuzzyJSONDecode(['', "\n"], {})
16
17 Execute(FuzzyJSONDecode should return the default for Lists with invalid JSON):
18   AssertEqual [], ale#util#FuzzyJSONDecode(['x'], [])
19   AssertEqual {}, ale#util#FuzzyJSONDecode(['x'], {})
20
21 Execute(FuzzyJSONDecode should return the default for Strings with invalid JSON):
22   AssertEqual [], ale#util#FuzzyJSONDecode('x', [])
23   AssertEqual {}, ale#util#FuzzyJSONDecode('x', {})
24
25 Execute(FuzzyJSONDecode should return the JSON from the JSON string):
26   AssertEqual {'x': 3}, ale#util#FuzzyJSONDecode('{"x": 3}', [])
27   AssertEqual {'x': 3}, ale#util#FuzzyJSONDecode('{"x": 3}', {})
28   AssertEqual {'x': 3}, ale#util#FuzzyJSONDecode(['{"x"', ': 3}'], [])
29   AssertEqual {'x': 3}, ale#util#FuzzyJSONDecode(['{"x"', ': 3}'], {})