summaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorKyle Criddle <criddle.kyle@gmail.com>2020-03-24 18:26:00 -0600
committerKyle Criddle <criddle.kyle@gmail.com>2020-03-24 18:26:00 -0600
commit59f2e2d58d3dc8ca31b74b9bad5899c4521baf0c (patch)
treec1e0664b2f11b3b59679444fdc1d89568b440c75 /tests
parentcfa2cb6ec77f8faaab134c296350b982ff1ffe40 (diff)
Implemented --file-name for multiple files + tests
Diffstat (limited to 'tests')
-rw-r--r--tests/integration_tests.rs29
1 files changed, 29 insertions, 0 deletions
diff --git a/tests/integration_tests.rs b/tests/integration_tests.rs
index f2722339..7750f6cd 100644
--- a/tests/integration_tests.rs
+++ b/tests/integration_tests.rs
@@ -598,3 +598,32 @@ fn filename_stdin_binary() {
.stdout("File: foo <BINARY>\n")
.stderr("");
}
+
+#[test]
+fn filename_multiple_ok() {
+ bat()
+ .arg("--decorations=always")
+ .arg("--style=header")
+ .arg("-r=0:0")
+ .arg("test.txt")
+ .arg("--file-name=foo")
+ .arg("single-line.txt")
+ .arg("--file-name=bar")
+ .assert()
+ .success()
+ .stdout("File: foo\nFile: bar\n")
+ .stderr("");
+}
+
+#[test]
+fn filename_multiple_err() {
+ bat()
+ .arg("--decorations=always")
+ .arg("--style=header")
+ .arg("-r=0:0")
+ .arg("test.txt")
+ .arg("--file-name=foo")
+ .arg("single-line.txt")
+ .assert()
+ .failure();
+}