tests/test-hgweb
changeset 5690 1b365c5723bc
parent 5580 f429e0e067a8
child 5924 b8009718a211
equal deleted inserted replaced
5689:c2d0ed7f4af8 5690:1b365c5723bc
     5 cd test
     5 cd test
     6 mkdir da
     6 mkdir da
     7 echo foo > da/foo
     7 echo foo > da/foo
     8 echo foo > foo
     8 echo foo > foo
     9 hg ci -Ambase -d '0 0'
     9 hg ci -Ambase -d '0 0'
    10 hg serve -p $HGPORT -d --pid-file=hg.pid
    10 hg serve -p $HGPORT -d --pid-file=hg.pid -A access.log
    11 cat hg.pid >> $DAEMON_PIDS
    11 cat hg.pid >> $DAEMON_PIDS
    12 echo % manifest
    12 echo % manifest
    13 ("$TESTDIR/get-with-headers.py" localhost:$HGPORT '/file/tip/?style=raw')
    13 ("$TESTDIR/get-with-headers.py" localhost:$HGPORT '/file/tip/?style=raw')
    14 ("$TESTDIR/get-with-headers.py" localhost:$HGPORT '/file/tip/da?style=raw')
    14 ("$TESTDIR/get-with-headers.py" localhost:$HGPORT '/file/tip/da?style=raw')
    15 
    15 
    26 "$TESTDIR/get-with-headers.py" localhost:$HGPORT '/file/tip/foo?cmd=spam&style=raw' | sed 's/400.*/400/'
    26 "$TESTDIR/get-with-headers.py" localhost:$HGPORT '/file/tip/foo?cmd=spam&style=raw' | sed 's/400.*/400/'
    27 
    27 
    28 echo % should give a 404 - file does not exist
    28 echo % should give a 404 - file does not exist
    29 "$TESTDIR/get-with-headers.py" localhost:$HGPORT '/file/tip/bork?style=raw'
    29 "$TESTDIR/get-with-headers.py" localhost:$HGPORT '/file/tip/bork?style=raw'
    30 
    30 
       
    31 echo % stop and restart
       
    32 kill `cat hg.pid`
       
    33 hg serve -p $HGPORT -d --pid-file=hg.pid -A access.log
       
    34 cat hg.pid >> $DAEMON_PIDS
       
    35 # Test the access/error files are opened in append mode
       
    36 python -c "print len(file('access.log').readlines()), 'log lines written'"
       
    37 
    31 echo % static file
    38 echo % static file
    32 "$TESTDIR/get-with-headers.py" localhost:$HGPORT '/static/style-gitweb.css'
    39 "$TESTDIR/get-with-headers.py" localhost:$HGPORT '/static/style-gitweb.css'