/[jscoverage]/trunk/tests/store-unreadable-json.sh
ViewVC logotype

Diff of /trunk/tests/store-unreadable-json.sh

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

revision 609 by siliconforks, Mon May 24 03:13:28 2010 UTC revision 610 by siliconforks, Fri Sep 24 20:35:36 2010 UTC
# Line 40  Line 40 
40  trap 'cleanup' 0 1 2 3 15  trap 'cleanup' 0 1 2 3 15
41    
42  rm -fr DIR  rm -fr DIR
43  $VALGRIND jscoverage-server --no-highlight --document-root=recursive --report-dir=DIR > OUT 2> ERR &  server_port=`perl unused-port.pl`
44    $VALGRIND jscoverage-server --port=$server_port --no-highlight --document-root=recursive --report-dir=DIR > OUT 2> ERR &
45  server_pid=$!  server_pid=$!
 server_port=8080  
46    
47  wait_for_server http://127.0.0.1:8080/jscoverage.html  wait_for_server http://127.0.0.1:${server_port}/jscoverage.html
48    
49  cat store.json | sed "s/@PREFIX@/\\//g" > TMP  cat store.json | sed "s/@PREFIX@/\\//g" > TMP
50  wget --post-file=TMP -q -O- http://127.0.0.1:8080/jscoverage-store > /dev/null  wget --post-file=TMP -q -O- http://127.0.0.1:${server_port}/jscoverage-store > /dev/null
51  cat store.expected.json | sed "s/@PREFIX@/\\//g" > TMP  cat store.expected.json | sed "s/@PREFIX@/\\//g" > TMP
52  json_cmp TMP DIR/jscoverage.json  json_cmp TMP DIR/jscoverage.json
53    
# Line 55  Line 55 
55    
56  cat store.json | sed "s/@PREFIX@/\\//g" > TMP  cat store.json | sed "s/@PREFIX@/\\//g" > TMP
57  echo 500 > EXPECTED  echo 500 > EXPECTED
58  ! curl -d @TMP -f -w '%{http_code}\n' http://127.0.0.1:8080/jscoverage-store 2> /dev/null > ACTUAL  ! curl -d @TMP -f -w '%{http_code}\n' http://127.0.0.1:${server_port}/jscoverage-store 2> /dev/null > ACTUAL
59  diff EXPECTED ACTUAL  diff EXPECTED ACTUAL

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

  ViewVC Help
Powered by ViewVC 1.1.24