/[jscoverage]/trunk/tests/server-encoded-url.sh
ViewVC logotype

Diff of /trunk/tests/server-encoded-url.sh

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 253 by siliconforks, Sun Oct 5 18:09:02 2008 UTC revision 610 by siliconforks, Fri Sep 24 20:35:36 2010 UTC
# Line 1  Line 1 
1  #!/bin/sh  #!/bin/sh
2  #    server-encoded-url.sh - test jscoverage-server with encoded URL  #    server-encoded-url.sh - test jscoverage-server with encoded URL
3  #    Copyright (C) 2008 siliconforks.com  #    Copyright (C) 2008, 2009, 2010 siliconforks.com
4  #  #
5  #    This program is free software; you can redistribute it and/or modify  #    This program is free software; you can redistribute it and/or modify
6  #    it under the terms of the GNU General Public License as published by  #    it under the terms of the GNU General Public License as published by
# Line 29  Line 29 
29    
30  trap 'cleanup' 0 1 2 3 15  trap 'cleanup' 0 1 2 3 15
31    
32  export PATH=.:..:$PATH  . ./common.sh
   
 if [ -z "$VALGRIND" ]  
 then  
   delay=0.2  
 else  
   delay=2  
 fi  
33    
34  rm -fr DIR  rm -fr DIR
35  mkdir DIR  mkdir DIR
36  $VALGRIND jscoverage-server --document-root=DIR &  server_port=`perl unused-port.pl`
37    $VALGRIND jscoverage-server --port=$server_port --document-root=DIR &
38  server_pid=$!  server_pid=$!
 server_port=8080  
39    
40  sleep $delay  wait_for_server http://127.0.0.1:${server_port}/jscoverage.html
41    
42  # make some funny files  # make some funny files
43  echo x > 'DIR/1+2.txt'  echo x > 'DIR/1+2.txt'
44  echo x > 'DIR/1&2.txt'  echo x > 'DIR/1&2.txt'
45  echo x > 'DIR/1 2.txt'  echo x > 'DIR/1 2.txt'
46    
47  wget -q -O- 'http://127.0.0.1:8080/1%2B2.txt' | diff 'DIR/1+2.txt' -  wget -q -O- "http://127.0.0.1:${server_port}/1%2B2.txt" | diff 'DIR/1+2.txt' -
48  wget -q -O- 'http://127.0.0.1:8080/1%2b2.txt' | diff 'DIR/1+2.txt' -  wget -q -O- "http://127.0.0.1:${server_port}/1%2b2.txt" | diff 'DIR/1+2.txt' -
49  wget -q -O- 'http://127.0.0.1:8080/1%262.txt' | diff 'DIR/1&2.txt' -  wget -q -O- "http://127.0.0.1:${server_port}/1%262.txt" | diff 'DIR/1&2.txt' -
50  wget -q -O- 'http://127.0.0.1:8080/1%202.txt' | diff 'DIR/1 2.txt' -  wget -q -O- "http://127.0.0.1:${server_port}/1%202.txt" | diff 'DIR/1 2.txt' -

Legend:
Removed from v.253  
changed lines
  Added in v.610

  ViewVC Help
Powered by ViewVC 1.1.24