Commit Graph

153 Commits (4c85483486172a706ab7fe7a5a7c7c4e6b8ebf3b)

Author SHA1 Message Date
Lena 4c85483486 Inline `format!` args wherever possible 4 months ago
einfachIrgendwer0815 83b00bc653
Rename `--squeeze` to `--squeeze-blank` 4 months ago
einfachIrgendwer0815 2323aa0def
Add tests for `--squeeze` 4 months ago
Oliver Looney c3f2ddf509
Merge branch 'master' into 2783-setting-terminal-title 4 months ago
Oliver looney 8a51172b11
simplified basic_set_terminal_title 4 months ago
Ethan P 1023399c5e
Remove hyperlink when wrapping lines 4 months ago
Ethan P 6549e26f5d
Re-emit hyperlinks when wrapping lines 4 months ago
Ethan P 2d46d54ae3
Add tests for re-emitting SGR sequences on wrap 4 months ago
Ethan P 3d04699710
Add regression test for #2541
More specifically, the test ensures that OSC sequences don't end up
wrapping the line.
4 months ago
Oliver looney 7ce010d9ed
Using hypens instead of underscores for set-terminal-title command 4 months ago
Oliver looney a8d07333e9
updated integration_tests.rs 4 months ago
Oliver looney 22254936a2
ran cargo fmt 4 months ago
Oliver looney f6d76e0104
added integration test for setting terminal title 4 months ago
Oliver looney c911829771
fixed failing tests 4 months ago
Filip Razek 1b88267320 Ensure test succeeds by adding flag 5 months ago
Filip Razek 45ee2dc4c7 fix: Wrap file name in header 5 months ago
Oliver looney 3b0ade9cb8
slightly changed set terminal command to match docs & broke print line into multiple variables 5 months ago
Oliver looney 907af9e35f
updated tests since terminal title is set conditionally 6 months ago
Oliver looney fd84e4f49f
fixed all but two failing tests. Last two tests are erroring because of IO circle detected error 6 months ago
einfachIrgendwer0815 3d87b25b19
Add unicode/caret replacements for all control characters (#2712) 8 months ago
Dan Gohman 319c675f3e Fix a double-`close` in the `no_args_doesnt_break` test.
Fix the `no_args_doesnt_break` test to avoid calling `from_raw_fd` twice
on the same raw file descriptor, as that cause the file descriptor to be
closed twice, which means it could accidentally close some unrelated newly
created file descriptor.
8 months ago
Nicolas AMBRY 5a240f36b9
Case insensitive `--map-syntax` (#2650)
Co-authored-by: Nicolas AMBRY <nicolas.ambry@atos.net>
9 months ago
J-Kappes e2bf85e749
Make -pp override --paging and vice versa when passed as a later argument. (#2660) 9 months ago
Anomalocaridid fe73010a5e ignore failing test 9 months ago
Anomalocaridid 433176ab54 require LESSOPEN to have exactly one %s 9 months ago
Anomalocaridid b56021ffa9 make LESSOPEN support opt-in 9 months ago
Boy van Duuren d6e11b59e7
#2592: Fixes unit tests dependent on echo on windows (#2602)
Co-authored-by: Boy van Duuren <boy.van.duuren@rabobank.nl>
9 months ago
Anomalocaridid e32ad0b048
Add `$LESSOPEN` and `$LESSCLOSE` support (#2444) 9 months ago
einfachIrgendwer0815 4b04f901fe Add test for `BAT_PAGING` 9 months ago
einfachIrgendwer0815 8f99a78cf1
Print non-printable characters using caret notation (#2443)
When the new flag is set, non-printable characters are printed using caret notation.
1 year ago
Martin Nordholts 4e34b362f8 Require changes to `-h` and `--help` to be blessed
From now on, any changes to the help texts will be visible in PR diffs,
which will make it very easy to review, and very hard to accidentally
miss changes to help texts.

If a contributor makes a change to help texts, the `cargo test` failure
text they will see contains instructions on how to update the blessed
help texts:

    error: expect test failed
       --> ../doc/long-help.txt

    You can update all `expect!` tests by running:

        env UPDATE_EXPECT=1 cargo test

In short, to update blessed help texts, one simply does

    env UPDATE_EXPECT=1 cargo test

Do not run the tests if the `git` feature is missing, since then
`--diff` will be missing from `--help`. And do not run the tests on
Windows, because then the help text will contain the term `.exe`.

Move man page step to after cargo doc step so that the man page exists
when we look for it.
1 year ago
Miles Liu e39178b101
Fix `bat cache --clear` not clearing the `--target` dir if specified 2 years ago
Aaron Kollasch 1224403aa1
Update comments in tests/integration_tests.rs 2 years ago
Aaron Kollasch 1a07baf5f2
Update tests/integration_tests.rs
Co-authored-by: David Peter <sharkdp@users.noreply.github.com>
2 years ago
Aaron Kollasch bad2292950
Add tests for --theme > BAT_THEME > config 2 years ago
Aaron Kollasch e773b48135
Fix cache subcommand and add tests
Treat the cache subcommand differently from --no-config:
For --no-config, insert args from selected environment variables
For cache, don't insert args
2 years ago
Aaron Kollasch 76aad7c74f
Improve correctness and add more tests 2 years ago
Aaron Kollasch 36ccc6a31e
Allow env vars to override config but not args 2 years ago
John Higgins bf114f5844
Added helper function for -S flag tests 2 years ago
John Higgins 236a2c5794
Fixed inverted logic on -S and --chop-long-lines 2 years ago
John Higgins 03216c9c18
Merge branch 'sharkdp:master' into master 2 years ago
John Higgins 8f31ffa9df
Added integration tests 2 years ago
Martin Nordholts 352309b056 Revert "Remove code that tries to handle ANSI escape inputs"
This reverts commit 8174e02279. Turns out
it is needed for a common use case, see
https://github.com/sharkdp/bat/issues/2307.

It is not a clean revert, because I adjust CHANGELOG.md and also add a
comment to the test. I also had to resolve a small `use` conflict.
2 years ago
dag-h 08386daa3a
Strip BOM from output in interactive mode (#1938)
* Strip BOM from output in interactive mode

* Strip BOM when not loop_through, add regression tests

* Update CHANGELOG.md

* Only strip BOM from beginning of first line

* Fix integration test on macOS that relied on color scheme

* Fix integration test on Windows that relied on detected terminal width

* Fix syntax test that was failing due to a previously wrong (now fixed) highlighting

Co-authored-by: David Peter <mail@david-peter.de>
Co-authored-by: Martin Nordholts <enselic@gmail.com>
2 years ago
Martin Nordholts 799bb1639c Try to fix all warnings 2 years ago
Martin Nordholts 2dd2994b2f Merge remote-tracking branch 'origin/master' into feature/668/add-systemwide-config 2 years ago
Martin Nordholts 899fdbb347
Remove code that tries to handle ANSI escape inputs (#2189)
Syntax highlighting is broken when input contains ANSI escape characters
anyway, so there is not much point in trying to handle ANSI escapes in
input.
2 years ago
Martin Nordholts 621ab6078f CI: Check MSRV without git feature enabled
git2-rs MSRV policy is to only support latest stable rust (see
https://github.com/rust-lang/git2-rs#rust-version-requirements), so it
does not make sense to run our MSRV tests with git enabled.
2 years ago
Christopher Acosta 9a924b445b
Make --map-syntax and --ignored-suffix work together (#2260)
* Make --map-syntax and --ignored-suffix work together

* Minor refactor
2 years ago
Marie Katrine Ekeberg 9c7ca33929
Make `--no-paging`/`-P` override `--paging=...` if passed as a later arg (#2201)
* Make the no-paging option override earlier paging options

* Update CHANGELOG.md

Co-authored-by: Martin Nordholts <enselic@gmail.com>
2 years ago