summaryrefslogtreecommitdiff
path: root/integrationtests/dcat_test.go
diff options
context:
space:
mode:
authorPaul Buetow <paul@buetow.org>2021-10-02 13:44:27 +0300
committerPaul Buetow <paul@buetow.org>2021-10-02 19:03:12 +0300
commit86ec83754e0ee7153ad55091f7b6da448bc529c5 (patch)
tree155687b0addb21a97a10a5ebb77928fadc3c62c3 /integrationtests/dcat_test.go
parent12c79f68bb5bda6673819d7b754820ecfe6d08ff (diff)
add dcat test
Diffstat (limited to 'integrationtests/dcat_test.go')
-rw-r--r--integrationtests/dcat_test.go22
1 files changed, 22 insertions, 0 deletions
diff --git a/integrationtests/dcat_test.go b/integrationtests/dcat_test.go
new file mode 100644
index 0000000..370ea25
--- /dev/null
+++ b/integrationtests/dcat_test.go
@@ -0,0 +1,22 @@
+package integrationtests
+
+import (
+ "os"
+ "testing"
+)
+
+func TestDCat(t *testing.T) {
+ testdataFile := "testdata.txt"
+ stdoutFile := "dcat.out"
+
+ if err := runCommand(t, "../dcat", []string{"-spartan", testdataFile}, stdoutFile); err != nil {
+ t.Error(err)
+ return
+ }
+
+ if err := compareFiles(t, stdoutFile, testdataFile); err != nil {
+ t.Error(err)
+ return
+ }
+ os.Remove(stdoutFile)
+}