/[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 295 by siliconforks, Sun Oct 12 22:45:57 2008 UTC revision 314 by siliconforks, Mon Oct 13 17:52:41 2008 UTC
# Line 40  Line 40 
40    delay=2    delay=2
41  fi  fi
42    
43    if jscoverage-server --version | grep -q 'iconv\|MultiByteToWideChar'
44    then
45      character_encoding_support=yes
46    else
47      character_encoding_support=no
48    fi
49    
50  rm -fr EXPECTED ACTUAL DIR OUT  rm -fr EXPECTED ACTUAL DIR OUT
51  mkdir DIR  mkdir DIR
52  $VALGRIND jscoverage-server --no-highlight --document-root=recursive --report-dir=DIR &  $VALGRIND jscoverage-server --no-highlight --document-root=recursive --report-dir=DIR &
# Line 149  Line 156 
156    
157  sleep $delay  sleep $delay
158    
159  wget -q -O- http://127.0.0.1:8080/javascript-iso-8859-1.js > OUT  case "$character_encoding_support" in
160  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    yes)
161        wget -q -O- http://127.0.0.1:8080/javascript-iso-8859-1.js > OUT
162        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
163        ;;
164      *)
165        echo 500 > EXPECTED
166        ! curl -f -w '%{http_code}\n' http://127.0.0.1:8080/javascript-iso-8859-1.js 2> /dev/null > ACTUAL
167        diff EXPECTED ACTUAL
168        ;;
169    esac
170    
171  # kill $server_pid  # kill $server_pid
172  shutdown  shutdown
# Line 161  Line 177 
177    
178  sleep $delay  sleep $delay
179    
180  wget -q -O- http://127.0.0.1:8080/javascript-utf-8.js > OUT  case "$character_encoding_support" in
181  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    yes)
182        wget -q -O- http://127.0.0.1:8080/javascript-utf-8.js > OUT
183        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
184        ;;
185      *)
186        echo 500 > EXPECTED
187        ! curl -f -w '%{http_code}\n' http://127.0.0.1:8080/javascript-utf-8.js 2> /dev/null > ACTUAL
188        diff EXPECTED ACTUAL
189        ;;
190    esac
191    
192  # kill $server_pid  # kill $server_pid
193  shutdown  shutdown

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

  ViewVC Help
Powered by ViewVC 1.1.24