]> arthur.barton.de Git - bup.git/blobdiff - t/test-web.sh
test-cat-file test-command-without-init-fails: test with python 3
[bup.git] / t / test-web.sh
index eedf87df44db27e88d9640d87745dc82a01c42f7..74e0f2bd4b3d6207622b1114d74614706107f3ea 100755 (executable)
@@ -36,13 +36,13 @@ if test -z "$(type -p curl)"; then
 fi
     
 WVPASS bup-python -c "import socket as s; s.socket(s.AF_UNIX).bind('socket')"
-curl --unix-socket ./socket http://localhost/foo
+curl -s --unix-socket ./socket http://localhost/foo
 if test $? -ne 7; then
     WVSTART 'curl does not appear to support --unix-socket; skipping test'
     run_test=''
 fi
 
-if ! python -c 'import tornado' 2> /dev/null; then
+if ! bup-python -c 'import tornado' 2> /dev/null; then
     WVSTART 'unable to import tornado; skipping test'
     run_test=''
 fi
@@ -61,6 +61,8 @@ if test -n "$run_test"; then
 
     WVPASS curl --unix-socket ./socket \
            'http://localhost/%C2%A1excitement%21/latest/data' > result
+    WVPASSEQ "$(curl --unix-socket ./socket http://localhost/static/styles.css)" \
+             "$(cat "$TOP/lib/web/static/styles.css")"
 
     WVPASSEQ '¡excitement!' "$(cat result)"
     WVPASS kill -s TERM "$web_pid"