summaryrefslogtreecommitdiff
path: root/tests/testweb
diff options
context:
space:
mode:
Diffstat (limited to 'tests/testweb')
-rw-r--r--tests/testweb/data1
-rw-r--r--tests/testweb/denied.txt1
-rw-r--r--tests/testweb/hello.txt1
-rw-r--r--tests/testweb/index.html15
-rw-r--r--tests/testweb/once.scm2
-rw-r--r--tests/testweb/pics/chicken-logo.pngbin0 -> 24679 bytes
-rw-r--r--tests/testweb/pics/lambda-chicken.gifbin0 -> 1050 bytes
-rw-r--r--tests/testweb/secrets/bank/pin-code.txt1
-rw-r--r--tests/testweb/secrets/password.txt1
-rw-r--r--tests/testweb/secrets/spiffy-access5
-rw-r--r--tests/testweb/spiffy-access4
-rw-r--r--tests/testweb/subdir with space/index.html14
-rw-r--r--tests/testweb/subdir/index.html15
-rw-r--r--tests/testweb/subdir/spiffy-access4
-rw-r--r--tests/testweb/subdir/subsubdir/index.html15
-rw-r--r--tests/testweb/test.myscript1
16 files changed, 80 insertions, 0 deletions
diff --git a/tests/testweb/data b/tests/testweb/data
new file mode 100644
index 0000000..1331fda
--- /dev/null
+++ b/tests/testweb/data
@@ -0,0 +1 @@
+This is some data. Who knows what content type it could be? \ No newline at end of file
diff --git a/tests/testweb/denied.txt b/tests/testweb/denied.txt
new file mode 100644
index 0000000..94e2755
--- /dev/null
+++ b/tests/testweb/denied.txt
@@ -0,0 +1 @@
+This file should not be accessible (tests ensure that)
diff --git a/tests/testweb/hello.txt b/tests/testweb/hello.txt
new file mode 100644
index 0000000..270c611
--- /dev/null
+++ b/tests/testweb/hello.txt
@@ -0,0 +1 @@
+hello, world!
diff --git a/tests/testweb/index.html b/tests/testweb/index.html
new file mode 100644
index 0000000..4ec1376
--- /dev/null
+++ b/tests/testweb/index.html
@@ -0,0 +1,15 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
+ "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+<head>
+ <title>This is an index page</title>
+</head>
+<body>
+<h1>An index page</h1>
+
+<p>Hard to believe, but yes, this is an index page. It does not really
+provide you with an index of any kind, but it's here to let spiffy's
+test know that we loaded the index page even when we simply provided a
+directory name with no filename.</p>
+</body>
+</html> \ No newline at end of file
diff --git a/tests/testweb/once.scm b/tests/testweb/once.scm
new file mode 100644
index 0000000..f725903
--- /dev/null
+++ b/tests/testweb/once.scm
@@ -0,0 +1,2 @@
+(let ((counter (with-input-from-file "counter" read)))
+ (with-output-to-file "counter" (lambda () (write (add1 counter)))))
diff --git a/tests/testweb/pics/chicken-logo.png b/tests/testweb/pics/chicken-logo.png
new file mode 100644
index 0000000..072b068
--- /dev/null
+++ b/tests/testweb/pics/chicken-logo.png
Binary files differ
diff --git a/tests/testweb/pics/lambda-chicken.gif b/tests/testweb/pics/lambda-chicken.gif
new file mode 100644
index 0000000..5c3ccc7
--- /dev/null
+++ b/tests/testweb/pics/lambda-chicken.gif
Binary files differ
diff --git a/tests/testweb/secrets/bank/pin-code.txt b/tests/testweb/secrets/bank/pin-code.txt
new file mode 100644
index 0000000..81c545e
--- /dev/null
+++ b/tests/testweb/secrets/bank/pin-code.txt
@@ -0,0 +1 @@
+1234
diff --git a/tests/testweb/secrets/password.txt b/tests/testweb/secrets/password.txt
new file mode 100644
index 0000000..a1ddf5c
--- /dev/null
+++ b/tests/testweb/secrets/password.txt
@@ -0,0 +1 @@
+Follow the yellow brick road \ No newline at end of file
diff --git a/tests/testweb/secrets/spiffy-access b/tests/testweb/secrets/spiffy-access
new file mode 100644
index 0000000..bd6e4e8
--- /dev/null
+++ b/tests/testweb/secrets/spiffy-access
@@ -0,0 +1,5 @@
+(lambda (continue)
+ (with-headers `((content-length ,(string-length noway)))
+ (lambda ()
+ (write-logged-response)
+ (display noway (response-port (current-response)))))) \ No newline at end of file
diff --git a/tests/testweb/spiffy-access b/tests/testweb/spiffy-access
new file mode 100644
index 0000000..a4ffff5
--- /dev/null
+++ b/tests/testweb/spiffy-access
@@ -0,0 +1,4 @@
+(lambda (continue)
+ (let ((counter (with-input-from-file "root-counter" read)))
+ (with-output-to-file "root-counter" (lambda () (write (add1 counter)))))
+ (continue))
diff --git a/tests/testweb/subdir with space/index.html b/tests/testweb/subdir with space/index.html
new file mode 100644
index 0000000..0d97655
--- /dev/null
+++ b/tests/testweb/subdir with space/index.html
@@ -0,0 +1,14 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
+ "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+<head>
+ <title>This is an index page in a subdir with a space</title>
+</head>
+<body>
+<h1>An index page</h1>
+
+<p>This is here to test whether Spiffy can handle redirects to URLs
+with spaces (and more generally, encoding of special URI chars)
+correctly.</p>
+</body>
+</html>
diff --git a/tests/testweb/subdir/index.html b/tests/testweb/subdir/index.html
new file mode 100644
index 0000000..8fecc46
--- /dev/null
+++ b/tests/testweb/subdir/index.html
@@ -0,0 +1,15 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
+ "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+<head>
+ <title>This is an index page in a subdir</title>
+</head>
+<body>
+<h1>An index page</h1>
+
+<p>Hard to believe, but yes, this is an index page in a subdir.
+It does not really provide you with an index of any kind, but it's
+here to let spiffy's test know that we loaded the index page even
+when we simply provided a directory name with no filename.</p>
+</body>
+</html>
diff --git a/tests/testweb/subdir/spiffy-access b/tests/testweb/subdir/spiffy-access
new file mode 100644
index 0000000..265eb7b
--- /dev/null
+++ b/tests/testweb/subdir/spiffy-access
@@ -0,0 +1,4 @@
+(lambda (continue)
+ (let ((counter (with-input-from-file "counter" read)))
+ (with-output-to-file "counter" (lambda () (write (add1 counter)))))
+ (continue))
diff --git a/tests/testweb/subdir/subsubdir/index.html b/tests/testweb/subdir/subsubdir/index.html
new file mode 100644
index 0000000..de9d3c3
--- /dev/null
+++ b/tests/testweb/subdir/subsubdir/index.html
@@ -0,0 +1,15 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
+ "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+<head>
+ <title>This is an index page in a subdir under a subdir</title>
+</head>
+<body>
+<h1>An index page</h1>
+
+<p>Hard to believe, but yes, this is an index page in a subsubdir.
+It does not really provide you with an index of any kind, but it's
+here to let spiffy's test know that we loaded the index page even
+when we simply provided a directory name with no filename.</p>
+</body>
+</html>
diff --git a/tests/testweb/test.myscript b/tests/testweb/test.myscript
new file mode 100644
index 0000000..4b3bed3
--- /dev/null
+++ b/tests/testweb/test.myscript
@@ -0,0 +1 @@
+Contents of this file are irrelevant \ No newline at end of file