Skip to content

Commit

Permalink
test scripts
Browse files Browse the repository at this point in the history
  • Loading branch information
Mark Fiers committed Nov 14, 2012
1 parent 03aa2ae commit 35ac2ac
Show file tree
Hide file tree
Showing 2 changed files with 39 additions and 0 deletions.
26 changes: 26 additions & 0 deletions test/scripts/templates/map.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
set -e

tmpdir=`mktemp -d`
cd $tmpdir
echo "Running in $PWD"

mkdir 10.input
cd 10.input
for x in $(seq -w 1 10)
do
touch input.$x
done
cd ..
mkdir 20.map
cd 20.map
moa new map -t 'test map'
moa set input='../10.input/input.*'
moa set output='./output.*'
moa set process='echo {{ input }} > {{ output }}'
moa run

grep '../10.input/input.01' output.01
grep '../10.input/input.04' output.04

cd ..
rm -rf $tmpdir
13 changes: 13 additions & 0 deletions test/scripts/templates/simple.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
set -v
tmpdir=`mktemp -d`
cd $tmpdir
echo "Running in $PWD"

moa new simple -t 'test simple'
moa set process='echo "hello" > output'
moa run
[[ -f output ]]
grep 'hello' output
echo "finished"

rm -rf $tmpdir

0 comments on commit 35ac2ac

Please sign in to comment.