diff options
author | pkoppstein <pkoppstein@gmail.com> | 2023-07-25 19:19:13 -0400 |
---|---|---|
committer | Nico Williams <nico@cryptonector.com> | 2023-07-25 23:43:57 -0500 |
commit | 13fbe98dff927dbe6a3eddd89e4487af3f009185 (patch) | |
tree | afed1454ca2c9afda5f96bdcd4b3fb6b6f69f5ea | |
parent | 7b725378b9803a1df74054ebd3d700d9daeb2049 (diff) |
manual.yml: remove contingent tests
Also clarify non-prescriptive nature of some tests in jq.test
-rw-r--r-- | docs/content/manual/manual.yml | 4 | ||||
-rw-r--r-- | jq.1.prebuilt | 4 | ||||
-rw-r--r-- | tests/jq.test | 13 | ||||
-rw-r--r-- | tests/man.test | 4 |
4 files changed, 15 insertions, 10 deletions
diff --git a/docs/content/manual/manual.yml b/docs/content/manual/manual.yml index 7f28150d..a2ff8a76 100644 --- a/docs/content/manual/manual.yml +++ b/docs/content/manual/manual.yml @@ -863,8 +863,8 @@ sections: examples: - program: 'map(abs)' - input: '[-10, -1.1, -1e-1, 1000000000000000002, -1000000000000000002]' - output: ['[10,1.1,1e-1,10000000000000002,1e+18]'] + input: '[-10, -1.1, -1e-1]' + output: ['[10,1.1,1e-1]'] - title: "`length`" body: | diff --git a/jq.1.prebuilt b/jq.1.prebuilt index ed7dc0d7..02518f54 100644 --- a/jq.1.prebuilt +++ b/jq.1.prebuilt @@ -849,8 +849,8 @@ To compute the absolute value of a number as a floating point number, you may wi .nf jq \'map(abs)\' - [\-10, \-1\.1, \-1e\-1, 1000000000000000002, \-1000000000000000002] -=> [10,1\.1,1e\-1,10000000000000002,1e+18] + [\-10, \-1\.1, \-1e\-1] +=> [10,1\.1,1e\-1] . .fi . diff --git a/tests/jq.test b/tests/jq.test index e79d60ca..f3804a7d 100644 --- a/tests/jq.test +++ b/tests/jq.test @@ -1814,12 +1814,17 @@ abs "abc" map(abs) +[-0, 0, -10, -1.1] +[0,0,10,1.1] + +map(fabs == length) | unique [-10, -1.1, -1e-1, 1000000000000000002] -[10,1.1,0.1,1000000000000000002] +[true] -map(fabs == length) | unique[0] -[-10, -1.1, -1e-1, 1000000000000000002, -1000000000000000002] -true +# The following is NOT prescriptive: +map(abs) +[0.1,1000000000000000002] +[1e-1, 1000000000000000002] # Using a keyword as variable/label name diff --git a/tests/man.test b/tests/man.test index 682c24aa..354043ba 100644 --- a/tests/man.test +++ b/tests/man.test @@ -189,8 +189,8 @@ null -1 map(abs) -[-10, -1.1, -1e-1, 1000000000000000002, -1000000000000000002] -[10,1.1,1e-1,10000000000000002,1e+18] +[-10, -1.1, -1e-1] +[10,1.1,1e-1] .[] | length [[1,2], "string", {"a":2}, null, -5] |