aboutsummaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
Diffstat (limited to 'test')
-rw-r--r--test/004-two-tracks.test/run.sh18
-rw-r--r--test/004-two-tracks.test/stdout.expected4
-rw-r--r--test/004-two-tracks.test/track_1.raw.expected1
-rw-r--r--test/004-two-tracks.test/track_2.raw.expected1
-rw-r--r--test/004-two-tracks.test/track_3.raw.expected1
-rw-r--r--test/004-two-tracks.test/track_4.raw.expected1
6 files changed, 26 insertions, 0 deletions
diff --git a/test/004-two-tracks.test/run.sh b/test/004-two-tracks.test/run.sh
new file mode 100644
index 0000000..7bb987c
--- /dev/null
+++ b/test/004-two-tracks.test/run.sh
@@ -0,0 +1,18 @@
+#!/bin/sh
+
+# create large file
+echo 0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ > raw
+
+echo -e '0:0:0\n0:1:0\n0:4:0\n0:10:0' | ${EXECUTABLE} -r 1 -c 1 -s 1 -i raw -f track_%d.raw
+
+
+for track in track_{1..4}.raw ; do
+ diff $track $track.expected >/dev/null
+ if [ $? -eq 0 ] ; then
+ rm $track
+ else
+ exit 1
+ fi
+done
+
+rm raw
diff --git a/test/004-two-tracks.test/stdout.expected b/test/004-two-tracks.test/stdout.expected
new file mode 100644
index 0000000..fc02f0b
--- /dev/null
+++ b/test/004-two-tracks.test/stdout.expected
@@ -0,0 +1,4 @@
+track_1.raw starts 0.000000 s, finishes 1.000000 s
+track_2.raw starts 1.000000 s, finishes 4.000000 s
+track_3.raw starts 4.000000 s, finishes 10.000000 s
+track_4.raw starts 10.000000 s, finishes EOF
diff --git a/test/004-two-tracks.test/track_1.raw.expected b/test/004-two-tracks.test/track_1.raw.expected
new file mode 100644
index 0000000..c227083
--- /dev/null
+++ b/test/004-two-tracks.test/track_1.raw.expected
@@ -0,0 +1 @@
+0 \ No newline at end of file
diff --git a/test/004-two-tracks.test/track_2.raw.expected b/test/004-two-tracks.test/track_2.raw.expected
new file mode 100644
index 0000000..d800886
--- /dev/null
+++ b/test/004-two-tracks.test/track_2.raw.expected
@@ -0,0 +1 @@
+123 \ No newline at end of file
diff --git a/test/004-two-tracks.test/track_3.raw.expected b/test/004-two-tracks.test/track_3.raw.expected
new file mode 100644
index 0000000..be01025
--- /dev/null
+++ b/test/004-two-tracks.test/track_3.raw.expected
@@ -0,0 +1 @@
+456789 \ No newline at end of file
diff --git a/test/004-two-tracks.test/track_4.raw.expected b/test/004-two-tracks.test/track_4.raw.expected
new file mode 100644
index 0000000..72d007b
--- /dev/null
+++ b/test/004-two-tracks.test/track_4.raw.expected
@@ -0,0 +1 @@
+ABCDEFGHIJKLMNOPQRSTUVWXYZ