Skip to content
Myr

manual.yml: remove contingent tests

Before adoption: this commit came in with the history the project adopted, so no landing records it.

Also clarify non-prescriptive nature of some tests in jq.test

authored by pkoppstein · committed by Nico Williams · parent 7b72537 · Browse files · 4 files+15 added−10 removed
This commit

State

Before adoption: this commit came in with the history the project adopted, so no landing records it.

Diff stats

4 files+15 added−10 removed

  • tests:+11 added−6 removed
  • other:+4 added−4 removed

4 files+15 added−10 removed

modified:docs/content/manual/manual.yml+2 added-2 removed
861 unmodified lines
862 To compute the absolute value of a number as a floating point number, you may wish use `fabs`.863864 examples:865 - program: 'map(abs)'866 input: '[-10, -1.1, -1e-1, 1000000000000000002, -1000000000000000002]'867 output: ['[10,1.1,1e-1,10000000000000002,1e+18]']866 input: '[-10, -1.1, -1e-1]'867 output: ['[10,1.1,1e-1]']868869 - title: "`length`"870 body: |871
2768 unmodified lines
modified:tests/jq.test+9 added-4 removed
1812 unmodified lines
1813"abc"1814"abc"18151816map(abs)1817[-0, 0, -10, -1.1]1818[0,0,10,1.1]18191820map(fabs == length) | unique1821[-10, -1.1, -1e-1, 1000000000000000002]1818[10,1.1,0.1,1000000000000000002]1822[true]18231820map(fabs == length) | unique[0]1821[-10, -1.1, -1e-1, 1000000000000000002, -1000000000000000002]1822true1824# The following is NOT prescriptive:1825map(abs)1826[0.1,1000000000000000002]1827[1e-1, 1000000000000000002]18281829# Using a keyword as variable/label name18301831123 as $label | $label
113 unmodified lines
modified:tests/man.test+2 added-2 removed
187 unmodified lines
1881189-1190191map(abs)192[-10, -1.1, -1e-1, 1000000000000000002, -1000000000000000002]193[10,1.1,1e-1,10000000000000002,1e+18]192[-10, -1.1, -1e-1]193[10,1.1,1e-1]194195.[] | length196[[1,2], "string", {"a":2}, null, -5]1972
750 unmodified lines
modified:jq.1.prebuilt+2 added-2 removed
847 unmodified lines
848.849.nf850851jq \'map(abs)\'852 [\-10, \-1\.1, \-1e\-1, 1000000000000000002, \-1000000000000000002]853=> [10,1\.1,1e\-1,10000000000000002,1e+18]852 [\-10, \-1\.1, \-1e\-1]853=> [10,1\.1,1e\-1]854.855.fi856.857.IP "" 0
3233 unmodified lines