/[jscoverage]/trunk/tests/server.sh
ViewVC logotype

Diff of /trunk/tests/server.sh

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

revision 130 by siliconforks, Tue Jun 3 02:41:23 2008 UTC revision 295 by siliconforks, Sun Oct 12 22:45:57 2008 UTC
# Line 40  Line 40 
40    delay=2    delay=2
41  fi  fi
42    
43  rm -fr EXPECTED DIR OUT  rm -fr EXPECTED ACTUAL DIR OUT
44  mkdir DIR  mkdir DIR
45  $VALGRIND jscoverage-server --document-root=recursive --report-dir=DIR &  $VALGRIND jscoverage-server --no-highlight --document-root=recursive --report-dir=DIR &
46  server_pid=$!  server_pid=$!
47  server_port=8080  server_port=8080
48    
# Line 53  Line 53 
53  wget -q -O- http://127.0.0.1:8080/unix.txt | diff recursive/unix.txt -  wget -q -O- http://127.0.0.1:8080/unix.txt | diff recursive/unix.txt -
54  wget -q -O- http://127.0.0.1:8080/windows.txt | diff recursive/windows.txt -  wget -q -O- http://127.0.0.1:8080/windows.txt | diff recursive/windows.txt -
55  wget -q -O- http://127.0.0.1:8080/image.png | diff recursive/image.png -  wget -q -O- http://127.0.0.1:8080/image.png | diff recursive/image.png -
56    wget -q -O- http://127.0.0.1:8080/x | diff recursive/x -
57  wget -q -O- http://127.0.0.1:8080/1/1.html | diff recursive/1/1.html -  wget -q -O- http://127.0.0.1:8080/1/1.html | diff recursive/1/1.html -
58  wget -q -O- http://127.0.0.1:8080/1/1.css | diff recursive/1/1.css -  wget -q -O- http://127.0.0.1:8080/1/1.css | diff recursive/1/1.css -
59  wget -q -O- http://127.0.0.1:8080/1/2/2.html | diff recursive/1/2/2.html -  wget -q -O- http://127.0.0.1:8080/1/2/2.html | diff recursive/1/2/2.html -
# Line 63  Line 64 
64    
65  # test javascript  # test javascript
66  wget -q -O- http://127.0.0.1:8080/script.js > OUT  wget -q -O- http://127.0.0.1:8080/script.js > OUT
67  cat recursive.expected/script.js ../report.js | sed 's/@PREFIX@/\//g' | diff - OUT  cat ../report.js recursive.expected/script.js | sed 's/@PREFIX@/\//g' | diff --strip-trailing-cr - OUT
68  wget -q -O- http://127.0.0.1:8080/1/1.js > OUT  wget -q -O- http://127.0.0.1:8080/1/1.js > OUT
69  cat recursive.expected/1/1.js ../report.js | sed 's/@PREFIX@/\//g' | diff - OUT  cat ../report.js recursive.expected/1/1.js | sed 's/@PREFIX@/\//g' | diff --strip-trailing-cr - OUT
70  wget -q -O- http://127.0.0.1:8080/1/2/2.js > OUT  wget -q -O- http://127.0.0.1:8080/1/2/2.js > OUT
71  cat recursive.expected/1/2/2.js ../report.js | sed 's/@PREFIX@/\//g' | diff - OUT  cat ../report.js recursive.expected/1/2/2.js | sed 's/@PREFIX@/\//g' | diff --strip-trailing-cr - OUT
72    
73  # test jscoverage  # test jscoverage
74  wget -q -O- http://127.0.0.1:8080/jscoverage.html | diff ../jscoverage.html -  wget -q -O- http://127.0.0.1:8080/jscoverage.html | diff ../jscoverage.html -
# Line 82  Line 83 
83  diff ../jscoverage.html DIR/jscoverage.html  diff ../jscoverage.html DIR/jscoverage.html
84  diff ../jscoverage.css DIR/jscoverage.css  diff ../jscoverage.css DIR/jscoverage.css
85  diff ../jscoverage-throbber.gif DIR/jscoverage-throbber.gif  diff ../jscoverage-throbber.gif DIR/jscoverage-throbber.gif
 diff ../jscoverage-sh_main.js DIR/jscoverage-sh_main.js  
 diff ../jscoverage-sh_javascript.js DIR/jscoverage-sh_javascript.js  
 diff ../jscoverage-sh_nedit.css DIR/jscoverage-sh_nedit.css  
86  echo -e 'jscoverage_isReport = true;\r' | cat ../jscoverage.js - | diff - DIR/jscoverage.js  echo -e 'jscoverage_isReport = true;\r' | cat ../jscoverage.js - | diff - DIR/jscoverage.js
87    
88  # 404 not found  # 404 not found
# Line 112  Line 110 
110  mkdir DIR  mkdir DIR
111  case `uname` in  case `uname` in
112    MINGW*)    MINGW*)
113      $VALGRIND jscoverage-server --port=8081 --document-root=recursive --report-dir=DIR --no-instrument=1/ &      $VALGRIND jscoverage-server --no-highlight --port=8081 --document-root=recursive --report-dir=DIR --no-instrument=1/ &
114      ;;      ;;
115    *)    *)
116      $VALGRIND jscoverage-server --port=8081 --document-root=recursive --report-dir=DIR --no-instrument=/1/ &      $VALGRIND jscoverage-server --no-highlight --port=8081 --document-root=recursive --report-dir=DIR --no-instrument=/1/ &
117      ;;      ;;
118  esac  esac
119  server_pid=$!  server_pid=$!
# Line 124  Line 122 
122  sleep $delay  sleep $delay
123    
124  wget -q -O- http://127.0.0.1:8081/script.js > OUT  wget -q -O- http://127.0.0.1:8081/script.js > OUT
125  cat recursive.expected/script.js ../report.js | sed 's/@PREFIX@/\//g' | diff - OUT  cat ../report.js recursive.expected/script.js | sed 's/@PREFIX@/\//g' | diff --strip-trailing-cr - OUT
126  wget -q -O- http://127.0.0.1:8081/1/1.js | diff recursive/1/1.js -  wget -q -O- http://127.0.0.1:8081/1/1.js | diff --strip-trailing-cr recursive/1/1.js -
127  wget -q -O- http://127.0.0.1:8081/1/2/2.js | diff recursive/1/2/2.js -  wget -q -O- http://127.0.0.1:8081/1/2/2.js | diff --strip-trailing-cr recursive/1/2/2.js -
128    
129  # kill $server_pid  # kill $server_pid
130  shutdown  shutdown
131    
132  $VALGRIND jscoverage-server --port 8082 --document-root recursive --report-dir DIR --no-instrument 1/ &  $VALGRIND jscoverage-server --no-highlight --port 8082 --document-root recursive --report-dir DIR --no-instrument 1/ &
133  server_pid=$!  server_pid=$!
134  server_port=8082  server_port=8082
135    
136  sleep $delay  sleep $delay
137    
138  wget -q -O- http://127.0.0.1:8082/script.js > OUT  wget -q -O- http://127.0.0.1:8082/script.js > OUT
139  cat recursive.expected/script.js ../report.js | sed 's/@PREFIX@/\//g' | diff - OUT  cat ../report.js recursive.expected/script.js | sed 's/@PREFIX@/\//g' | diff --strip-trailing-cr - OUT
140  wget -q -O- http://127.0.0.1:8082/1/1.js | diff recursive/1/1.js -  wget -q -O- http://127.0.0.1:8082/1/1.js | diff --strip-trailing-cr recursive/1/1.js -
141  wget -q -O- http://127.0.0.1:8082/1/2/2.js | diff recursive/1/2/2.js -  wget -q -O- http://127.0.0.1:8082/1/2/2.js | diff --strip-trailing-cr recursive/1/2/2.js -
142    
143    # kill $server_pid
144    shutdown
145    
146    $VALGRIND jscoverage-server --port 8080 --encoding iso-8859-1 --document-root javascript &
147    server_pid=$!
148    server_port=8080
149    
150    sleep $delay
151    
152    wget -q -O- http://127.0.0.1:8080/javascript-iso-8859-1.js > OUT
153    cat ../report.js javascript.expected/javascript-iso-8859-1.js | sed 's/javascript-iso-8859-1.js/\/javascript-iso-8859-1.js/g' | diff --strip-trailing-cr - OUT
154    
155    # kill $server_pid
156    shutdown
157    
158    $VALGRIND jscoverage-server --no-highlight --port=8080 --encoding=utf-8 --document-root=javascript-utf-8 &
159    server_pid=$!
160    server_port=8080
161    
162    sleep $delay
163    
164    wget -q -O- http://127.0.0.1:8080/javascript-utf-8.js > OUT
165    cat ../report.js javascript-utf-8.expected/javascript-utf-8.js | sed 's/javascript-utf-8.js/\/javascript-utf-8.js/g' | diff --strip-trailing-cr - OUT
166    
167    # kill $server_pid
168    shutdown
169    
170    $VALGRIND jscoverage-server --port 8080 --encoding BOGUS --document-root javascript &
171    server_pid=$!
172    server_port=8080
173    
174    sleep $delay
175    
176    echo 500 > EXPECTED
177    ! curl -f -w '%{http_code}\n' http://127.0.0.1:8080/javascript-iso-8859-1.js 2> /dev/null > ACTUAL
178    diff EXPECTED ACTUAL
179    
180    # kill $server_pid
181    shutdown
182    
183    $VALGRIND jscoverage-server --port 8080 --encoding utf-8 --document-root javascript &
184    server_pid=$!
185    server_port=8080
186    
187    sleep $delay
188    
189    echo 500 > EXPECTED
190    ! curl -f -w '%{http_code}\n' http://127.0.0.1:8080/javascript-iso-8859-1.js 2> /dev/null > ACTUAL
191    diff EXPECTED ACTUAL

Legend:
Removed from v.130  
changed lines
  Added in v.295

  ViewVC Help
Powered by ViewVC 1.1.24