mirror of
https://github.com/sharkdp/bat.git
synced 2025-01-18 20:11:03 +00:00
Fix another instance of the 'bat cache' bug, closes #584
This commit is contained in:
parent
f3824bad17
commit
2e71146801
@ -19,6 +19,7 @@ pub fn build_app(interactive_output: bool) -> ClapApp<'static, 'static> {
|
|||||||
.global_setting(AppSettings::UnifiedHelpMessage)
|
.global_setting(AppSettings::UnifiedHelpMessage)
|
||||||
.global_setting(AppSettings::HidePossibleValuesInHelp)
|
.global_setting(AppSettings::HidePossibleValuesInHelp)
|
||||||
.setting(AppSettings::ArgsNegateSubcommands)
|
.setting(AppSettings::ArgsNegateSubcommands)
|
||||||
|
.setting(AppSettings::AllowExternalSubcommands)
|
||||||
.setting(AppSettings::DisableHelpSubcommand)
|
.setting(AppSettings::DisableHelpSubcommand)
|
||||||
.setting(AppSettings::VersionlessSubcommands)
|
.setting(AppSettings::VersionlessSubcommands)
|
||||||
.max_term_width(100)
|
.max_term_width(100)
|
||||||
|
1
tests/examples/cache.c
vendored
Normal file
1
tests/examples/cache.c
vendored
Normal file
@ -0,0 +1 @@
|
|||||||
|
test
|
@ -451,7 +451,7 @@ fn utf16() {
|
|||||||
|
|
||||||
#[test]
|
#[test]
|
||||||
fn can_print_file_named_cache() {
|
fn can_print_file_named_cache() {
|
||||||
bat()
|
bat_with_config()
|
||||||
.arg("cache")
|
.arg("cache")
|
||||||
.assert()
|
.assert()
|
||||||
.success()
|
.success()
|
||||||
@ -459,6 +459,16 @@ fn can_print_file_named_cache() {
|
|||||||
.stderr("");
|
.stderr("");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#[test]
|
||||||
|
fn can_print_file_starting_with_cache() {
|
||||||
|
bat_with_config()
|
||||||
|
.arg("cache.c")
|
||||||
|
.assert()
|
||||||
|
.success()
|
||||||
|
.stdout("test\n")
|
||||||
|
.stderr("");
|
||||||
|
}
|
||||||
|
|
||||||
#[test]
|
#[test]
|
||||||
fn does_not_print_unwanted_file_named_cache() {
|
fn does_not_print_unwanted_file_named_cache() {
|
||||||
bat_with_config().arg("cach").assert().failure();
|
bat_with_config().arg("cach").assert().failure();
|
||||||
|
Loading…
x
Reference in New Issue
Block a user