• source navigation  • diff markup  • identifier search  • freetext search  • 

Sources/cgi-io/tests/cram/test-san_cgi-exec.t

  1 check that cgi-exec is producing expected results:
  2 
  3   $ [ -n "$BUILD_BIN_DIR" ] && export PATH="$BUILD_BIN_DIR:$PATH"
  4   $ ln -sf $BUILD_BIN_DIR/cgi-io-san $BUILD_BIN_DIR/cgi-exec
  5 
  6   $ for file in $(LC_ALL=C find "$TESTDIR/test-cases" -type f | sort); do
  7   >   export CONTENT_TYPE="application/x-www-form-urlencoded"; \
  8   >   export CONTENT_LENGTH="$(wc -c < $file)"; \
  9   >   printf "\n[-] testing: $(basename $file)\n"; \
 10   >   cgi-exec < $file; \
 11   > done
 12   
 13   [-] testing: cgi-exec-01.txt
 14   Status: 400 Invalid command parameter\r (esc)
 15   Content-Type: text/plain\r (esc)
 16   \r (esc)
 17   Invalid command parameter
 18   
 19   [-] testing: cgi-exec-02.txt
 20   Status: 200 OK\r (esc)
 21   Content-Type: application/octet-stream\r (esc)
 22   \r (esc)
 23   foo
 24   
 25   [-] testing: cgi-exec-03.txt
 26   Status: 200 OK\r (esc)
 27   Content-Type: 0\r (esc)
 28   Content-Disposition: attachment; filename="output.txt"\r (esc)
 29   \r (esc)
 30   1922

This page was automatically generated by LXR 0.3.1.  •  OpenWrt