diff options
author | Stefan Siegl <stesie@brokenpipe.de> | 2006-04-13 22:45:29 +0000 |
---|---|---|
committer | Stefan Siegl <stesie@brokenpipe.de> | 2006-04-13 22:45:29 +0000 |
commit | c2552b393a785f7ba9872215695ff3a22cbdfd5f (patch) | |
tree | 629e2c20f59913e3335fba1614fcc796d708af71 | |
parent | e9628408d3d7a81f40448d4f7918f70667e33e44 (diff) |
little script to test every hello-translator from the example directories in turn
-rwxr-xr-x | libfuse-test-hello.sh | 40 |
1 files changed, 40 insertions, 0 deletions
diff --git a/libfuse-test-hello.sh b/libfuse-test-hello.sh new file mode 100755 index 000000000..1b3b3c401 --- /dev/null +++ b/libfuse-test-hello.sh @@ -0,0 +1,40 @@ +#! /bin/sh + +do_test() { + echo "" + echo " *****************************************************" + echo " * testing in $1/ ..." + echo " ***" + make -C $1 hello || { + echo "FAILED to compile hello translator from $1/" + exit 2 + } + + test -e node && settrans -fg node + + settrans -fca node $1/hello || { + echo "FAILED to set translator $1/hello" + exit 2 + } + + test -e node/hello || { + echo "node/hello file missing, but should be there." + exit 1 + } + + test `stat --format "%s" node/hello` -eq 13 || { + echo "node/hello expected to be 13 bytes long." + exit 1 + } + + grep -q "Hello World" node/hello || { + echo "node/hello doesn't contain 'Hello World'" + exit 1 + } + + echo "looks good." + echo +} + +# now let's get it on ... +for A in example*; do do_test $A || exit 1; done |