Changeset 18361 in project for release/4/spiffy/trunk/tests/run.scm


Ignore:
Timestamp:
06/06/10 15:07:22 (11 years ago)
Author:
sjamaan
Message:

Fix #266

File:
1 edited

Legend:

Unmodified
Added
Removed
  • release/4/spiffy/trunk/tests/run.scm

    r18086 r18361  
    6363(define index-subdir (with-input-from-file "testweb/subdir/index.html" read-string))
    6464(define index-subsubdir (with-input-from-file "testweb/subdir/subsubdir/index.html" read-string))
     65(define index-subdir-with-space (with-input-from-file "testweb/subdir with space/index.html" read-string))
     66
    6567
    6668(test-begin "static file serving")
     
    8284
    8385(test-begin "path normalization")
    84 (test "index page redir" '(/ "subdir" "") (uri-path (header-value 'location (fetch-file "/subdir" "testhost" get-headers: #t))))
    85 (test "index page redir preserves GET args" '((foo . "bar")) (uri-query (header-value 'location (fetch-file "/subdir?foo=bar" "testhost" get-headers: #t))))
    86 (test "index page redir status" 301 (car (fetch-file "/subdir" "testhost")))
    87 (test "index page" `(200 ,index-subdir) (fetch-file "/subdir/" "testhost"))
     86(test "index page redir" '(/ "subdir with space" "") (uri-path (header-value 'location (fetch-file "/subdir%20with%20space" "testhost" get-headers: #t))))
     87(test "index page redir preserves GET args" '((foo . "bar")) (uri-query (header-value 'location (fetch-file "/subdir%20with%20space?foo=bar" "testhost" get-headers: #t))))
     88(test "index page redir status" 301 (car (fetch-file "/subdir%20with%20space" "testhost")))
     89(test "index page" `(200 ,index-subdir-with-space) (fetch-file "/subdir%20with%20space/" "testhost"))
    8890(test "break out of webroot fails" `(200 ,index-subdir) (fetch-file "/subdir/../../subdir/" "testhost"))
    8991(test "index page in subdir vhost" `(200 ,index-subdir) (fetch-file "/" "subdir-host"))
Note: See TracChangeset for help on using the changeset viewer.