Skip to content

Commit

Permalink
manual.yml: remove contingent tests
Browse files Browse the repository at this point in the history
Also clarify non-prescriptive nature of some tests in jq.test
  • Loading branch information
pkoppstein authored and nicowilliams committed Jul 26, 2023
1 parent 7b72537 commit 13fbe98
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 10 deletions.
4 changes: 2 additions & 2 deletions docs/content/manual/manual.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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: |
Expand Down
4 changes: 2 additions & 2 deletions jq.1.prebuilt

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

13 changes: 9 additions & 4 deletions tests/jq.test
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
4 changes: 2 additions & 2 deletions tests/man.test

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 13fbe98

Please sign in to comment.