Commit Graph

63 Commits

Author SHA1 Message Date
sharkdp
35e3c51b75 Fix unused import warning 2021-01-06 22:09:22 +01:00
sharkdp
59c9105c25 Fix clippy warnings in tests on Windows 2021-01-06 22:08:14 +01:00
Martin Nordholts
9ccb667653 Add integration test for unparsable pager
Right now all tests pass even if we e.g. return

    Ok(OutputType::stdout())

instead of doing

    .chain_err(|| "Could not parse pager command.")?

so add a test to make sure this functionality don't break.
2021-01-06 11:58:08 +01:00
Niklas Mohrin
b600f62ab6 Add unix specific integration test about running bat without any arguments 2021-01-05 18:21:16 +01:00
Niklas Mohrin
ace655e164 Add integration tests for clircle cycle detection 2021-01-05 18:21:16 +01:00
Martin Nordholts
a63bb08eda Add test 'grid_for_file_without_newline' (for issue #299 fix)
This is a regression test for the fix for issue #299. If that fix is
reverted, currently only one test ('header_padding') fails. But that
test is for a different use case, so add a dedicated regression test for
the particular use case issue #299 is about.
2020-12-21 21:45:34 +01:00
sharkdp
3e9afe2974 Add integration test for nonexisting newline 2020-12-21 08:34:22 +01:00
sharkdp
bd2e9917da Revert "Add cycle detection integration tests"
This reverts commit ec60d84265.
2020-11-24 21:40:11 +01:00
Niklas Mohrin
4f0116bee7 Add cycle detection integration tests 2020-11-23 14:06:54 +01:00
Ethan P
61f947a580
Merge pull request #1276 from tommilligan/style-rule
style: add component 'rule' for horizontal file delimiter
2020-10-31 23:14:00 -07:00
Adrian Rivera
9837948c3a Throws an error when bat is being user as pager.
As mentioned on #1334 `bat` should not be used as a value for `pager`,
this change checks both the balue of `bat` provided as a parameter or
as an environment variable.
2020-10-29 19:33:58 +01:00
Tom Milligan
1614f80366
add integration test for grid overriding rule 2020-10-12 09:04:57 +01:00
Tom Milligan
c1af6ff2e6
Add integration test for style rule 2020-10-12 09:04:27 +01:00
Tom Milligan
aa4000cb0d
style: add component 'rule' for horizontal file delimiter 2020-10-12 09:04:27 +01:00
sharkdp
71b2089384 Code formatting 2020-09-20 20:47:21 +02:00
Dash Peters
6faf61552e Fix integration test 2020-07-09 08:15:04 +02:00
Dash Peters
f53ea60ed4 Merge remote-tracking branch 'sharkdp/master' 2020-07-02 00:04:55 -07:00
Evgeniy Andreev (gsomix)
3c5ce9f86c Enable non-printable chars for redirected output (#1061) 2020-07-02 09:36:58 +04:00
Dash Peters
bfac6fd85c Add integration tests 2020-06-30 12:41:50 -07:00
Roy Ivy III
92e93682c6 Revert f8ed8aa7 (add test instrumentation to help understand failing tests) per PR feedback/owner request
- reverts commit f8ed8aa74b
2020-06-03 09:13:47 +02:00
Roy Ivy III
4840c7cd78 Tests ~ add predicate normalization for tests using echo 2020-06-03 09:13:47 +02:00
Roy Ivy III
71ab4a2058 Tests ~ revert to echo (after fixed 'windows' pager process execution) 2020-06-03 09:13:47 +02:00
Roy Ivy III
01af28b781 Tests ~ add instrumentation to visualize text differences in failing tests 2020-06-03 09:13:47 +02:00
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
2020-06-03 09:13:47 +02:00
Ethan P
b8687bc969
Merge branch 'master' of github.com:sharkdp/bat into string-input 2020-05-15 13:22:24 -07:00
Ethan P
9166c9dd35
Remove unnecessary clone in integration tests 2020-05-15 12:29:01 -07:00
Ethan P
82981c9663
Add regression test for detected syntax differing for stdin and files 2020-05-13 02:53:19 -07:00
Prat T
b3373398e8 Remove padding if the header style is not enabled 2020-05-12 16:37:29 +02:00
Prat T
0040fef215 Add padding above headers when no grid 2020-05-12 16:37:29 +02:00
sharkdp
5449472f15 Remove invalid UTF-8 file from repo, use temp file instead 2020-04-21 16:02:28 +02:00
sharkdp
82e20bfe14 Fix bug for file with invalid-utf8 filenames 2020-04-21 14:09:18 +02:00
sharkdp
03c2281828 Add do-not-panic! regression tests 2020-04-21 11:50:26 +02:00
Kyle Criddle
59f2e2d58d Implemented --file-name for multiple files + tests 2020-03-24 18:26:00 -06:00
Kyle Criddle
cfa2cb6ec7 --file-name for normal files. integration tests. 2020-03-19 20:46:19 -06:00
sharkdp
b1183f72a5 Update to new assert_cmd 2020-03-09 21:30:46 +01:00
sharkdp
ca066bf7cd Run 'cargo fmt' 2020-02-28 10:27:06 +01:00
Kogia-sima
60f48a0c91 Update test data
Avoid using existing text
2020-02-28 09:06:51 +01:00
Kogia-sima
22ded00824 Add test for unicode wrapping 2020-02-28 09:06:51 +01:00
Ethan P
2dac1c8785 Add @sharkdp's regression test for #798 2020-02-28 07:56:24 +01:00
sharkdp
f5d359927a Fix 'bat cache other-arg', closes #666 2019-09-21 09:10:12 +02:00
sharkdp
2e71146801 Fix another instance of the 'bat cache' bug, closes #584 2019-08-31 14:13:36 +02:00
sharkdp
f3824bad17 Add explicit terminal width for test 2019-08-31 13:46:48 +02:00
sharkdp
3a75d85b80 Add test for 'snip' feature 2019-08-31 13:46:48 +02:00
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
2019-05-10 17:55:46 -05:00
sharkdp
fa3244f7c1 Add test for UTF-16LE encoding 2019-02-10 10:18:07 +01:00
sharkdp
906774e6d3 Integration tests for single-line files 2019-02-10 10:18:07 +01:00
Reid Wagner
cec9cc073c Add integration tests running bat with empty input files. 2019-02-08 23:30:33 +01:00
sharkdp
c6a526f99c Run 'cargo run' only once 2018-11-04 12:24:56 +01:00
sharkdp
278d841408 Move '--paging' arg to config file. 2018-11-04 11:19:49 +01:00
sharkdp
5f576f1ecf Remove all relevant environment variables during testing 2018-11-04 11:19:49 +01:00