]> git.donarmstrong.com Git - biopieces.git/commitdiff
added write_tab tests
authormartinahansen <martinahansen@74ccb610-7750-0410-82ae-013aeee3265d>
Wed, 4 Aug 2010 12:10:19 +0000 (12:10 +0000)
committermartinahansen <martinahansen@74ccb610-7750-0410-82ae-013aeee3265d>
Wed, 4 Aug 2010 12:10:19 +0000 (12:10 +0000)
git-svn-id: http://biopieces.googlecode.com/svn/trunk@1031 74ccb610-7750-0410-82ae-013aeee3265d

bp_test/in/write_tab.in [new file with mode: 0644]
bp_test/out/write_tab.out.1 [new file with mode: 0644]
bp_test/out/write_tab.out.2 [new file with mode: 0644]
bp_test/out/write_tab.out.3 [new file with mode: 0644]
bp_test/out/write_tab.out.4 [new file with mode: 0644]
bp_test/out/write_tab.out.5 [new file with mode: 0644]
bp_test/out/write_tab.out.6 [new file with mode: 0644]
bp_test/test/test_write_tab [new file with mode: 0755]

diff --git a/bp_test/in/write_tab.in b/bp_test/in/write_tab.in
new file mode 100644 (file)
index 0000000..00a3fdf
--- /dev/null
@@ -0,0 +1,16 @@
+Organism: Human
+Count: 23524
+Sequence: ATACGTCAG
+---
+Organism: Dog
+Count: 2442
+Sequence: AGCATGAC
+---
+Organism: Mouse
+Count: 234
+Sequence: GACTG
+---
+Organism: Cat
+Count: 2342
+Sequence: AAATGCA
+---
diff --git a/bp_test/out/write_tab.out.1 b/bp_test/out/write_tab.out.1
new file mode 100644 (file)
index 0000000..6904cfe
--- /dev/null
@@ -0,0 +1,4 @@
+Human  23524   ATACGTCAG
+Dog    2442    AGCATGAC
+Mouse  234     GACTG
+Cat    2342    AAATGCA
diff --git a/bp_test/out/write_tab.out.2 b/bp_test/out/write_tab.out.2
new file mode 100644 (file)
index 0000000..4a817dd
--- /dev/null
@@ -0,0 +1,5 @@
+#Organism      Count   Sequence
+Human  23524   ATACGTCAG
+Dog    2442    AGCATGAC
+Mouse  234     GACTG
+Cat    2342    AAATGCA
diff --git a/bp_test/out/write_tab.out.3 b/bp_test/out/write_tab.out.3
new file mode 100644 (file)
index 0000000..8d49696
--- /dev/null
@@ -0,0 +1,4 @@
+Human,23524,ATACGTCAG
+Dog,2442,AGCATGAC
+Mouse,234,GACTG
+Cat,2342,AAATGCA
diff --git a/bp_test/out/write_tab.out.4 b/bp_test/out/write_tab.out.4
new file mode 100644 (file)
index 0000000..6904cfe
--- /dev/null
@@ -0,0 +1,4 @@
+Human  23524   ATACGTCAG
+Dog    2442    AGCATGAC
+Mouse  234     GACTG
+Cat    2342    AAATGCA
diff --git a/bp_test/out/write_tab.out.5 b/bp_test/out/write_tab.out.5
new file mode 100644 (file)
index 0000000..d47efe4
--- /dev/null
@@ -0,0 +1,4 @@
+23524
+2442
+234
+2342
diff --git a/bp_test/out/write_tab.out.6 b/bp_test/out/write_tab.out.6
new file mode 100644 (file)
index 0000000..e4a83d4
--- /dev/null
@@ -0,0 +1,4 @@
+Human  ATACGTCAG
+Dog    AGCATGAC
+Mouse  GACTG
+Cat    AAATGCA
diff --git a/bp_test/test/test_write_tab b/bp_test/test/test_write_tab
new file mode 100755 (executable)
index 0000000..b24c628
--- /dev/null
@@ -0,0 +1,28 @@
+#!/bin/bash
+
+source "$BP_DIR/bp_test/lib/test.sh"
+
+run "write_tab -I $in -o $tmp -x"
+assert_no_diff $tmp $out.1
+rm $tmp
+
+run "write_tab -I $in -c -o $tmp -x"
+assert_no_diff $tmp $out.2
+rm $tmp
+
+run "write_tab -I $in -d ',' -o $tmp -x"
+assert_no_diff $tmp $out.3
+rm $tmp
+
+run "write_tab -I $in -Z -o $tmp.gz -x"
+gunzip $tmp.gz
+assert_no_diff $tmp $out.4
+rm $tmp
+
+run "write_tab -I $in -k 'Count' -o $tmp -x"
+assert_no_diff $tmp $out.5
+rm $tmp
+
+run "write_tab -I $in -K 'Count' -o $tmp -x"
+assert_no_diff $tmp $out.6
+rm $tmp