Permalink
Browse files

Unit tests reverted to use root node in the top level directory.

  • Loading branch information...
halhen committed Apr 23, 2009
1 parent fc62247 commit 7bae74134f4ed5c63553e38dae8ad121033f3f50
Showing with 14 additions and 14 deletions.
  1. +14 −14 test.sh
28 test.sh
@@ -7,29 +7,29 @@ mkdir -p mnt/
# Do basic tests
cd mnt/
if [ `find ./ -name '*.node' | wc -l` -ne 2 ]; then
echo "Too many %d.nodes in .";
if [ `find 1.root/ -name '*.node' | wc -l` -ne 2 ]; then
echo "Too many %d.nodes in 1.root";
fi
if [ `find ./1.node/ -name 'attribute' | wc -l` -ne 1 ]; then
echo "attribute error in ./1.node/";
if [ `find 1.root/1.node/ -name 'attribute' | wc -l` -ne 1 ]; then
echo "attribute error in 1.root/1.node/";
fi
if [ `find ./1.node/ -name 'attribute2' | wc -l` -ne 0 ]; then
echo "attribute2 should not be in ./1.node";
if [ `find 1.root/1.node/ -name 'attribute2' | wc -l` -ne 0 ]; then
echo "attribute2 should not be in 1.root/1.node";
fi
if [ `cat ./1.node/attribute` != "attrib_value" ]; then
echo "./1.node/attribute does not contain 'attrib_value'";
if [ `cat 1.root/1.node/attribute` != "attrib_value" ]; then
echo "1.root/1.node/attribute does not contain 'attrib_value'";
fi
if [ `find ./2.node/ -name 'attribute' | wc -l` -ne 0 ]; then
echo "attribute should not be in ./1.node/";
if [ `find 1.root/2.node/ -name 'attribute' | wc -l` -ne 0 ]; then
echo "attribute should not be in 1.root/1.node/";
fi
if [ `find ./2.node/ -name 'attribute2' | wc -l` -ne 1 ]; then
echo "attribute2 error in ./1.node";
if [ `find 1.root/2.node/ -name 'attribute2' | wc -l` -ne 1 ]; then
echo "attribute2 error in 1.root/1.node";
fi
if [ "`cat ./1.textcontent/#text`" != "some text" ]; then
echo "Failed to read ./1.textcontent/#text properly";
if [ "`cat 1.root/1.textcontent/#text`" != "some text" ]; then
echo "Failed to read 1.root/1.textcontent/#text properly";
fi
cd ..

0 comments on commit 7bae741

Please sign in to comment.