Skip to content

Commit d94c308

Browse files
committed
Refactored test formatting
1 parent 890c87d commit d94c308

File tree

1 file changed

+12
-9
lines changed

1 file changed

+12
-9
lines changed

test/keys.t

Lines changed: 12 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -6,22 +6,25 @@ use Test::More tests 5
66
use JSON
77

88
tree1=$(cat test/keys.json | JSON.load)
9-
ok $? "JSON.load succeeded"
9+
ok $? \
10+
"JSON.load succeeded"
1011

11-
is "$(JSON.get '/files/file 2.txt/type' tree1)" '"text/plain"' \
12-
"JSON.get works"
12+
is "$(JSON.get '/files/file 2.txt/type' tree1)" \
13+
'"text/plain"' \
14+
"JSON.get works"
1315

1416
file_object=$(JSON.object '/files' tree1)
1517

1618
keys="$(JSON.keys '/' file_object)"
17-
18-
is "$keys" "file1.txt"$'\n'"file 2.txt" \
19-
"JSON.keys '/'"
19+
is "$keys" \
20+
"file1.txt"$'\n'"file 2.txt" \
21+
"JSON.keys '/'" #'
2022

2123
keys="$(JSON.keys '/files' tree1)"
22-
is "$keys" "file1.txt"$'\n'"file 2.txt" \
23-
"JSON.keys 'files'"
24+
is "$keys" \
25+
"file1.txt"$'\n'"file 2.txt" \
26+
"JSON.keys '/files'" #'
2427

2528
keys="$(JSON.keys '/' tree1)"
2629
is "$keys" "description"$'\n'"files" \
27-
"JSON.keys ''"
30+
"JSON.keys '/'" #'

0 commit comments

Comments
 (0)