Commit Graph

43 Commits (master)

Author SHA1 Message Date
einfachIrgendwer0815 2323aa0def
Add tests for `--squeeze` 3 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
Filip Razek 45ee2dc4c7 fix: Wrap file name in header 5 months ago
einfachIrgendwer0815 3d87b25b19
Add unicode/caret replacements for all control characters (#2712) 8 months ago
Nicolas AMBRY 5a240f36b9
Case insensitive `--map-syntax` (#2650)
Co-authored-by: Nicolas AMBRY <nicolas.ambry@atos.net>
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
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
John Higgins bf114f5844
Added helper function for -S flag tests 2 years ago
John Higgins 8f31ffa9df
Added integration tests 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 2dd2994b2f Merge remote-tracking branch 'origin/master' into feature/668/add-systemwide-config 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
Keith Hall b5294f1cb2
Skip syntax highlighting for long lines (#2165)
* Skip highlighting for long lines

* Run cargo fmt, update changelog
2 years ago
Patrick Pichler 6b660ef63a Add test for systemwide config file support
There is now a new stage in the CICD workflow present, which will build
`bat` with the `BAT_SYSTEM_CONFIG_PREFIX` set to load the config file
from `/tests/examples/system_config/bat/config`, plus a basic set of
tests, to ensure the feature is working as expected. By default the
tests are set to ignored, as they need special setup before they can be
run.
2 years ago
cyqsimon 14ddda0a8b
Recognize files in `$XDG_CONFIG_HOME/git/` and `$HOME/.config/git/` better (#2067)
* git global config - lookup $XDG_CONFIG_HOME faithfully

* Use `bool::then`

* Cover both `$XDG_CONFIG_HOME` & `$HOME/.config`

* Remove unused import

* Global git config tests

* Added trailing newline

* Fix git config test

* Wrote to changelog

* Revert change of `Result::ok` to `Result::unwrap`

* Apply suggestions from code review

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

* Guard against empty `$HOME`

Co-authored-by: Martin Nordholts <enselic@gmail.com>
2 years ago
Bojan Đurđević d6ed5e6746
Support for ignored-suffix CLI arguments (#1892) 3 years ago
Martin Nordholts 9ed9a6fc3d
Simplify HighlightingAssets::get_syntax() first_line logic (#1852)
And make self.get_first_line_syntax() be called lazily.
3 years ago
Niklas Mohrin b8a18d3ebb Use tempfiles for clircle tests 3 years ago
Niklas Mohrin ace655e164 Add integration tests for clircle cycle detection 3 years ago
sharkdp bd2e9917da Revert "Add cycle detection integration tests"
This reverts commit ec60d84265.
4 years ago
Niklas Mohrin 4f0116bee7 Add cycle detection integration tests 4 years ago
Evgeniy Andreev (gsomix) 3c5ce9f86c Enable non-printable chars for redirected output (#1061) 4 years ago
Roy Ivy III 71ab4a2058 Tests ~ revert to `echo` (after fixed 'windows' pager process execution) 4 years ago
Roy Ivy III 3a7743ffc5 Tests ~ `echo` has portability issues; for CI, replace with `printf`
- using `echo` on 'windows' platforms requires process execution indirectly via the shell
- `printf` is available on all GHA CI platforms
  - `printf` is *not* available on usual 'windows' platforms; so this is just temporizing, awaiting a true fix
4 years ago
Ethan P 82981c9663
Add regression test for detected syntax differing for stdin and files 4 years ago
sharkdp 5449472f15 Remove invalid UTF-8 file from repo, use temp file instead 4 years ago
sharkdp 82e20bfe14 Fix bug for file with invalid-utf8 filenames 4 years ago
sharkdp 03c2281828 Add do-not-panic! regression tests 4 years ago
Kyle Criddle cfa2cb6ec7 --file-name for normal files. integration tests. 4 years ago
Kogia-sima 60f48a0c91 Update test data
Avoid using existing text
4 years ago
Kogia-sima 22ded00824 Add test for unicode wrapping 4 years ago
sharkdp 2e71146801 Fix another instance of the 'bat cache' bug, closes #584 5 years ago
sharkdp 72152296c7 Fix accidental printing of files named 'cache'
This also adds two regression tests, so this will hopefully not pop up
again.

closes #557
5 years ago
sharkdp fa3244f7c1 Add test for UTF-16LE encoding 5 years ago
sharkdp 906774e6d3 Integration tests for single-line files 5 years ago
Reid Wagner cec9cc073c Add integration tests running bat with empty input files. 5 years ago
sharkdp 278d841408 Move '--paging' arg to config file. 6 years ago
Ricky 558134f6c8 Changed to unwrap methods, added integration tests 6 years ago
Lawrence Chou 76e34b29ec Avoid empty line in snapshot 6 years ago
Lawrence Chou 58198d0700 rewrite 6 snapshot tests as integration test 6 years ago
sharkdp 1891e194b5 Add simple integration tests 6 years ago