1
0
mirror of https://github.com/sharkdp/bat.git synced 2025-09-01 19:02:22 +01:00

Fix another instance of the 'bat cache' bug, closes #584

This commit is contained in:
sharkdp
2019-08-31 14:13:19 +02:00
parent f3824bad17
commit 2e71146801
3 changed files with 13 additions and 1 deletions

1
tests/examples/cache.c vendored Normal file
View File

@@ -0,0 +1 @@
test

View File

@@ -451,7 +451,7 @@ fn utf16() {
#[test]
fn can_print_file_named_cache() {
bat()
bat_with_config()
.arg("cache")
.assert()
.success()
@@ -459,6 +459,16 @@ fn can_print_file_named_cache() {
.stderr("");
}
#[test]
fn can_print_file_starting_with_cache() {
bat_with_config()
.arg("cache.c")
.assert()
.success()
.stdout("test\n")
.stderr("");
}
#[test]
fn does_not_print_unwanted_file_named_cache() {
bat_with_config().arg("cach").assert().failure();