summaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorsharkdp <davidpeter@web.de>2019-02-10 08:52:38 +0100
committerDavid Peter <sharkdp@users.noreply.github.com>2019-02-10 10:18:07 +0100
commit906774e6d3e55831a29f611757f609fba0717628 (patch)
treee3275e0b15592c68deaad7a105962f357d3702b6 /tests
parentcec9cc073c477c0a664415b846fd7f2518c69ee3 (diff)
Integration tests for single-line files
Diffstat (limited to 'tests')
-rw-r--r--tests/examples/single-line.txt1
-rw-r--r--tests/integration_tests.rs21
2 files changed, 22 insertions, 0 deletions
diff --git a/tests/examples/single-line.txt b/tests/examples/single-line.txt
new file mode 100644
index 00000000..87fa50e7
--- /dev/null
+++ b/tests/examples/single-line.txt
@@ -0,0 +1 @@
+Single Line \ No newline at end of file
diff --git a/tests/integration_tests.rs b/tests/integration_tests.rs
index 72499ea9..c0c282e3 100644
--- a/tests/integration_tests.rs
+++ b/tests/integration_tests.rs
@@ -129,6 +129,27 @@ fn concatenate_empty_first_and_last() {
}
#[test]
+fn concatenate_single_line() {
+ bat()
+ .arg("single-line.txt")
+ .arg("single-line.txt")
+ .assert()
+ .success()
+ .stdout("Single LineSingle Line");
+}
+
+#[test]
+fn concatenate_single_line_empty() {
+ bat()
+ .arg("single-line.txt")
+ .arg("empty.txt")
+ .arg("single-line.txt")
+ .assert()
+ .success()
+ .stdout("Single LineSingle Line");
+}
+
+#[test]
fn line_numbers() {
bat()
.arg("multiline.txt")