September 2017 Update
This commit is contained in:
parent
bba7bfd280
commit
ba8067c3b7
14570 changed files with 153136 additions and 63871 deletions
19
Task/Test-a-function/Jq/test-a-function-1.jq
Normal file
19
Task/Test-a-function/Jq/test-a-function-1.jq
Normal file
|
|
@ -0,0 +1,19 @@
|
|||
# Test case 1:
|
||||
.
|
||||
1
|
||||
1
|
||||
|
||||
# Test case 2:
|
||||
1+1
|
||||
null
|
||||
2
|
||||
|
||||
# Test case 3 (with the wrong result):
|
||||
1+1
|
||||
null
|
||||
0
|
||||
|
||||
# A test case with a function definition:
|
||||
def factorial: if . <= 0 then 1 else . * ((. - 1) | factorial) end; factorial
|
||||
3
|
||||
6
|
||||
Loading…
Add table
Add a link
Reference in a new issue