diff options
Diffstat (limited to 'integrationtests/dcat_test.go')
| -rw-r--r-- | integrationtests/dcat_test.go | 27 |
1 files changed, 27 insertions, 0 deletions
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 |
