manual.yml: remove contingent tests
Also clarify non-prescriptive nature of some tests in jq.test
This commit is contained in:
1 parent
7b725378b9
commit
13fbe98dff
4 files changed
+16
-11
No files matched your search
@@ -863,8 +863,8 @@ sections:
|
|||||||
|
|
||||||
examples:
|
examples:
|
||||||
- program: 'map(abs)'
|
- program: 'map(abs)'
|
||||||
input: '[-10, -1.1, -1e-1, 1000000000000000002, -1000000000000000002]'
|
input: '[-10, -1.1, -1e-1]'
|
||||||
output: ['[10,1.1,1e-1,10000000000000002,1e+18]']
|
output: ['[10,1.1,1e-1]']
|
||||||
|
|
||||||
- title: "`length`"
|
- title: "`length`"
|
||||||
body: |
|
body: |
|
||||||
|
|||||||
Generated
+2
-2
@@ -849,8 +849,8 @@ To compute the absolute value of a number as a floating point number, you may wi
|
|||||||
.nf
|
.nf
|
||||||
|
|
||||||
jq \'map(abs)\'
|
jq \'map(abs)\'
|
||||||
[\-10, \-1\.1, \-1e\-1, 1000000000000000002, \-1000000000000000002]
|
[\-10, \-1\.1, \-1e\-1]
|
||||||
=> [10,1\.1,1e\-1,10000000000000002,1e+18]
|
=> [10,1\.1,1e\-1]
|
||||||
.
|
.
|
||||||
.fi
|
.fi
|
||||||
.
|
.
|
||||||
|
|||||||
+10
-5
@@ -1814,12 +1814,17 @@ abs
|
|||||||
"abc"
|
"abc"
|
||||||
|
|
||||||
map(abs)
|
map(abs)
|
||||||
[-10, -1.1, -1e-1, 1000000000000000002]
|
[-0, 0, -10, -1.1]
|
||||||
[10,1.1,0.1,1000000000000000002]
|
[0,0,10,1.1]
|
||||||
|
|
||||||
map(fabs == length) | unique[0]
|
map(fabs == length) | unique
|
||||||
[-10, -1.1, -1e-1, 1000000000000000002, -1000000000000000002]
|
[-10, -1.1, -1e-1, 1000000000000000002]
|
||||||
true
|
[true]
|
||||||
|
|
||||||
|
# The following is NOT prescriptive:
|
||||||
|
map(abs)
|
||||||
|
[0.1,1000000000000000002]
|
||||||
|
[1e-1, 1000000000000000002]
|
||||||
|
|
||||||
# Using a keyword as variable/label name
|
# Using a keyword as variable/label name
|
||||||
|
|
||||||
|
|||||||
Generated
+2
-2
@@ -189,8 +189,8 @@ null
|
|||||||
-1
|
-1
|
||||||
|
|
||||||
map(abs)
|
map(abs)
|
||||||
[-10, -1.1, -1e-1, 1000000000000000002, -1000000000000000002]
|
[-10, -1.1, -1e-1]
|
||||||
[10,1.1,1e-1,10000000000000002,1e+18]
|
[10,1.1,1e-1]
|
||||||
|
|
||||||
.[] | length
|
.[] | length
|
||||||
[[1,2], "string", {"a":2}, null, -5]
|
[[1,2], "string", {"a":2}, null, -5]
|
||||||
|
|||||||
Reference in new issue
Block a user