6 printf "== %s UUID pattern match test ==\n" "$uuid_file"
7 if cat "$uuid_file" | grep -Eq "^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$"; then
8 echo "== test SUCCESS =="
10 echo "== test FAILURE =="
15 ./add_dir.sh test/test_dir
16 cp test/test_files/test.md test/test_dir/
17 cp test/test_files/foo.rst test/test_dir/
18 cp test/test_files/bar\ baz.md test/test_dir/
22 uuid_regex="^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$"
23 for file in test/test_files/*.html test/test_files/*.meta; do
24 cmp_file=`echo "$file" | sed 's/test_files/test_dir/'`
25 if [ ! "$file" = "test/test_files/index.html" ] && \
26 echo "$file" | grep -q "\.html$"; then
27 uuid_test "${cmp_file%.html}.uuid"
29 printf "== %s diff test ==\n" "$cmp_file"
30 diff "$file" "$cmp_file"
31 if [ "$?" = "0" ]; then
32 echo "== test SUCCESS =="
34 echo "== test FAILURE =="
37 uuid_test "test/test_dir/uuid.meta"