Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
29 changes: 27 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -142,7 +142,7 @@ Note that the tests are meant to be used with jq 1.7.1.
- [x] `getpath(path)` (passthrough)
- [x] `group`, `group_by(f)`
- [x] `gsub($regex; f)` (passthrough)
- [ ] `gsub($regex; f; $flags)`
- [x] `gsub($regex; f; $flags)` (passthrough)
- [x] `halt_error`, `halt_error($exit_code)`
- [x] `has($key)` (passthrough)
- [x] `implode` (passthrough)
Expand Down Expand Up @@ -201,12 +201,37 @@ Note that the tests are meant to be used with jq 1.7.1.
- [ ] `@format "string"` Format string
- [ ] `label $out | break $out` Break out
- [ ] `include "f"`, `import "f"` Include
- [ ] CLI options
- [x] `--help` / `-h`
- [x] `--null-input` / `-n`
- [ ] `--raw-input` / `-R`
- [x] `--slurp` / `-s`
- [x] `--compact-output` / `-c`
- [x] `--raw-output` / `-r`
- [x] `--raw-output0`
- [x] `--join-output` / `-j`
- [x] `--color-output` / `-C`
- [x] `--monochrome-output` / `-M`
- [ ] `-L directory`
- [ ] `--arg name value`
- [ ] `--rawfile name filename`
- [x] `--run-tests`
- [ ] `--run-tests [filename]`
- [x] `--`
- [ ] Combined short options
- [ ] More...
- Non-standard CLI options
- [x] `--jq`
- [x] `--lex`
- [x] `--no-builtins`
- [x] `--parse`
- [x] `--repl`
- [x] Run jqjq with jqjq
- [x] Bugs

### jq's test suite

```
```sh
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I tried to rerun this, still 307, but i did notice that something seems strange with the output when running tests. Have a look at make test guessing it's the switch to --join-output that require some change?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I just changed ./jqjq to replace --join-output with --raw-output for --run-tests.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I get 308 on jq.test from jq origin/main.

Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Huh made sure i had master also now, still 307, weird, some locale thing? anyways, that's for another time

$ ./jqjq --run-tests < ../jq/tests/jq.test | grep passed
307 of 449 tests passed
```
Expand Down
8 changes: 4 additions & 4 deletions jqjq
Original file line number Diff line number Diff line change
@@ -1,18 +1,18 @@
#!/bin/bash
#!/usr/bin/env bash
# wrapper for jqjq cli entrypoint
# shellcheck disable=SC2016

JQ="jq"
JQJQ_PATH="$(dirname "$(realpath "${BASH_SOURCE[0]}")")"
ARGS=("$@")

JQ_ARGS=("--raw-output" "--null-input")
JQ_ARGS=("--join-output" "--null-input")
# some arguments require to run jq in different input/output mode
while [ "$1" != "" ]; do
case "$1" in
--jq) shift; JQ="$1";;
--run-tests) JQ_ARGS+=("--raw-input" "--slurp");;
--repl) JQ_ARGS+=("--raw-input" "--join-output");;
--run-tests) JQ_ARGS+=("--raw-input" "--slurp"); JQ_ARGS[0]="--raw-output";;
--repl) JQ_ARGS+=("--raw-input");;
--) break;;
esac
shift
Expand Down
Loading