From 906774e6d3e55831a29f611757f609fba0717628 Mon Sep 17 00:00:00 2001 From: sharkdp Date: Sun, 10 Feb 2019 08:52:38 +0100 Subject: [PATCH] Integration tests for single-line files --- tests/examples/single-line.txt | 1 + tests/integration_tests.rs | 21 +++++++++++++++++++++ 2 files changed, 22 insertions(+) create mode 100644 tests/examples/single-line.txt 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 @@ -128,6 +128,27 @@ fn concatenate_empty_first_and_last() { .stdout("hello world\n"); } +#[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()