summaryrefslogtreecommitdiffstats
path: root/tests/integration_tests.rs
diff options
context:
space:
mode:
Diffstat (limited to 'tests/integration_tests.rs')
-rw-r--r--tests/integration_tests.rs52
1 files changed, 52 insertions, 0 deletions
diff --git a/tests/integration_tests.rs b/tests/integration_tests.rs
index 3102cb13..72499ea9 100644
--- a/tests/integration_tests.rs
+++ b/tests/integration_tests.rs
@@ -77,6 +77,58 @@ fn concatenate_stdin() {
}
#[test]
+fn concatenate_empty_first() {
+ bat()
+ .arg("empty.txt")
+ .arg("test.txt")
+ .assert()
+ .success()
+ .stdout("hello world\n");
+}
+
+#[test]
+fn concatenate_empty_last() {
+ bat()
+ .arg("test.txt")
+ .arg("empty.txt")
+ .assert()
+ .success()
+ .stdout("hello world\n");
+}
+
+#[test]
+fn concatenate_empty_both() {
+ bat()
+ .arg("empty.txt")
+ .arg("empty.txt")
+ .assert()
+ .success()
+ .stdout("");
+}
+
+#[test]
+fn concatenate_empty_between() {
+ bat()
+ .arg("test.txt")
+ .arg("empty.txt")
+ .arg("test.txt")
+ .assert()
+ .success()
+ .stdout("hello world\nhello world\n");
+}
+
+#[test]
+fn concatenate_empty_first_and_last() {
+ bat()
+ .arg("empty.txt")
+ .arg("test.txt")
+ .arg("empty.txt")
+ .assert()
+ .success()
+ .stdout("hello world\n");
+}
+
+#[test]
fn line_numbers() {
bat()
.arg("multiline.txt")