From a83bb03ebe6687521bfefc7f9cef3e435770f287 Mon Sep 17 00:00:00 2001 From: martinahansen Date: Wed, 4 Aug 2010 12:10:19 +0000 Subject: [PATCH] added write_tab tests git-svn-id: http://biopieces.googlecode.com/svn/trunk@1031 74ccb610-7750-0410-82ae-013aeee3265d --- bp_test/in/write_tab.in | 16 ++++++++++++++++ bp_test/out/write_tab.out.1 | 4 ++++ bp_test/out/write_tab.out.2 | 5 +++++ bp_test/out/write_tab.out.3 | 4 ++++ bp_test/out/write_tab.out.4 | 4 ++++ bp_test/out/write_tab.out.5 | 4 ++++ bp_test/out/write_tab.out.6 | 4 ++++ bp_test/test/test_write_tab | 28 ++++++++++++++++++++++++++++ 8 files changed, 69 insertions(+) create mode 100644 bp_test/in/write_tab.in create mode 100644 bp_test/out/write_tab.out.1 create mode 100644 bp_test/out/write_tab.out.2 create mode 100644 bp_test/out/write_tab.out.3 create mode 100644 bp_test/out/write_tab.out.4 create mode 100644 bp_test/out/write_tab.out.5 create mode 100644 bp_test/out/write_tab.out.6 create mode 100755 bp_test/test/test_write_tab diff --git a/bp_test/in/write_tab.in b/bp_test/in/write_tab.in new file mode 100644 index 0000000..00a3fdf --- /dev/null +++ b/bp_test/in/write_tab.in @@ -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 index 0000000..6904cfe --- /dev/null +++ b/bp_test/out/write_tab.out.1 @@ -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 index 0000000..4a817dd --- /dev/null +++ b/bp_test/out/write_tab.out.2 @@ -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 index 0000000..8d49696 --- /dev/null +++ b/bp_test/out/write_tab.out.3 @@ -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 index 0000000..6904cfe --- /dev/null +++ b/bp_test/out/write_tab.out.4 @@ -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 index 0000000..d47efe4 --- /dev/null +++ b/bp_test/out/write_tab.out.5 @@ -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 index 0000000..e4a83d4 --- /dev/null +++ b/bp_test/out/write_tab.out.6 @@ -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 index 0000000..b24c628 --- /dev/null +++ b/bp_test/test/test_write_tab @@ -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 -- 2.39.2