summaryrefslogtreecommitdiff
path: root/integrationtests
diff options
context:
space:
mode:
Diffstat (limited to 'integrationtests')
-rw-r--r--integrationtests/dcat3.txt3
-rw-r--r--integrationtests/dcat3.txt.expected5
-rw-r--r--integrationtests/dcat_test.go27
3 files changed, 35 insertions, 0 deletions
diff --git a/integrationtests/dcat3.txt b/integrationtests/dcat3.txt
new file mode 100644
index 0000000..f57b70b
--- /dev/null
+++ b/integrationtests/dcat3.txt
@@ -0,0 +1,3 @@
+A short line
+A long line (dcat will split it up into multiple smaller lines): Some random content here Some random content here Some random content here Some random content here Some random content here Some random content here Some random content here Some random content here Some random content here Some random content here Some random content here Some random content here Some random content here Some random content here Some random content here Some random content here Some random content here Some random content here Some random content here Some random content here Some random content here Some random content here Some random content here Some random content here Some random content here Some random content here Some random content here Some random content here Some random content here Some random content here Some random content here Some random content here Some random content here Some random content here Some random content here Some random content here Some random content here Some random content here Some random content here Some random content here Some random content here Some random content here Some random content here Some random content here Some random content here Some random content here Some random content here Some random content here Some random content here Some random content here Some random content here Some random content here Some random content here Some random content here Some random content here Some random content here Some random content here Some random content here Some random content here Some random content here Some random content here Some random content here Some random content here Some random content here Some random content here Some random content here Some random content here Some random content here Some random content here Some random content here Some random content here Some random content here Some random content here Some random content here Some random content here Some random content here Some random content here Some random content here Some random content here Some random content here Some random content here Some random content here Some random content here Some random content here Some random content here Some random content here Some random content here Some random content here Some random content here Some random content here Some random content here Some random content here Some random content here Some random content here Some random content here Some random content here Some random content here Some random content here Some random content here Some random content here Some random content here Some random content here!
+Another short line
diff --git a/integrationtests/dcat3.txt.expected b/integrationtests/dcat3.txt.expected
new file mode 100644
index 0000000..730f31a
--- /dev/null
+++ b/integrationtests/dcat3.txt.expected
@@ -0,0 +1,5 @@
+A short line
+A long line (dcat will split it up into multiple smaller lines): Some random content here Some random content here Some random content here Some random content here Some random content here Some random content here Some random content here Some random content here Some random content here Some random content here Some random content here Some random content here Some random content here Some random content here Some random content here Some random content here Some random content here Some random content here Some random content here Some random content here Some random content here Some random content here Some random content here Some random content here Some random content here Some random content here Some random content here Some random content here Some random content here Some random content here Some random content here Some random content here Some random content here Some random content here Some random content here Some random content here Some random content here Some random content here Some rand
+om content here Some random content here Some random content here Some random content here Some random content here Some random content here Some random content here Some random content here Some random content here Some random content here Some random content here Some random content here Some random content here Some random content here Some random content here Some random content here Some random content here Some random content here Some random content here Some random content here Some random content here Some random content here Some random content here Some random content here Some random content here Some random content here Some random content here Some random content here Some random content here Some random content here Some random content here Some random content here Some random content here Some random content here Some random content here Some random content here Some random content here Some random content here Some random content here Some random content here Some random content here Some ran
+dom content here Some random content here Some random content here Some random content here Some random content here Some random content here Some random content here Some random content here Some random content here Some random content here Some random content here Some random content here Some random content here Some random content here Some random content here Some random content here Some random content here Some random content here Some random content here Some random content here Some random content here Some random content here Some random content here!
+Another short line
diff --git a/integrationtests/dcat_test.go b/integrationtests/dcat_test.go
index bef5db2..d07279a 100644
--- a/integrationtests/dcat_test.go
+++ b/integrationtests/dcat_test.go
@@ -68,6 +68,33 @@ func TestDCat2(t *testing.T) {
os.Remove(outFile)
}
+func TestDCat3(t *testing.T) {
+ if !config.Env("DTAIL_INTEGRATION_TEST_RUN_MODE") {
+ return
+ }
+ inFile := "dcat3.txt"
+ expectedFile := "dcat3.txt.expected"
+ outFile := "dcat3.out"
+
+ args := []string{"--plain", "--logLevel", "error", "--cfg", "none", inFile}
+
+ // Split up long lines to smaller ones.
+ os.Setenv("DTAIL_MAX_LINE_LENGTH", "1000")
+
+ _, err := runCommand(context.TODO(), t, outFile, "../dcat", args...)
+ if err != nil {
+ t.Error(err)
+ return
+ }
+
+ if err := compareFilesContents(t, outFile, expectedFile); err != nil {
+ t.Error(err)
+ return
+ }
+
+ os.Remove(outFile)
+}
+
func TestDCatColors(t *testing.T) {
if !config.Env("DTAIL_INTEGRATION_TEST_RUN_MODE") {
return