Skip to content

Commit

Permalink
Add a long option --no-capture
Browse files Browse the repository at this point in the history
The option `-c` allows to disable capture and this option
has no long variant with self-explained name.
The patch fixes that.

Closes #391
  • Loading branch information
ligurio committed Sep 27, 2024
1 parent 39da6d2 commit 1b5b346
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
- Add `treegen` helper as a tree generator (gh-364).
- Add support for declarative configuration to `server.lua` (gh-367).
- Make `assert_covers` recursive (gh-379).
- Add alias `--no-capture` for the option `-c` (gh-391).

## 1.0.1

Expand Down
4 changes: 2 additions & 2 deletions luatest/runner.lua
Original file line number Diff line number Diff line change
Expand Up @@ -138,7 +138,7 @@ Options:
-vv, Increase log verbosity to VERBOSE level for luatest runnner
-vvv, Increase log verbosity to DEBUG level for luatest runnner
-q, --quiet: Set verbosity to minimum
-c Disable capture
-c, --no-capture Disable capture
-b Print full backtrace (don't remove luatest frames)
-e, --error: Stop on first error
-f, --failure: Stop on first failure or error
Expand Down Expand Up @@ -236,7 +236,7 @@ function Runner.parse_cmd_line(args)
table.insert(result.tests_pattern, '!' .. next_arg())
elseif arg == '-b' then
result.full_backtrace = true
elseif arg == '-c' then
elseif arg == '--no-capture' or arg == '-c' then
result.enable_capture = false
elseif arg == '--coverage' then
result.coverage_report = true
Expand Down

0 comments on commit 1b5b346

Please sign in to comment.