Просмотр исходного кода

New test for server side includes (SSI)

bel2125 9 лет назад
Родитель
Сommit
a2178b9045
11 измененных файлов с 42 добавлено и 40 удалено
  1. 5 0
      test/hello.shtml
  2. 0 5
      test/ssi1.shtml
  3. 0 5
      test/ssi2.shtml
  4. 0 5
      test/ssi3.shtml
  5. 0 5
      test/ssi4.shtml
  6. 0 5
      test/ssi5.shtml
  7. 0 5
      test/ssi6.shtml
  8. 0 6
      test/ssi7.shtml
  9. 0 1
      test/ssi8.shtml
  10. 0 3
      test/ssi9.shtml
  11. 37 0
      test/ssi_test.shtml

+ 5 - 0
test/hello.shtml

@@ -0,0 +1,5 @@
+<pre>
+hello.shtml: include "hello.txt":
+<!--#include file="hello.txt" -->
+hello.shtml: end
+</pre>

+ 0 - 5
test/ssi1.shtml

@@ -1,5 +0,0 @@
-<html><pre>
-ssi_begin
-<!--#include file="../Makefile" -->
-ssi_end
-</pre></html>

+ 0 - 5
test/ssi2.shtml

@@ -1,5 +0,0 @@
-<html><pre>
-ssi_begin
-<!--#include virtual="embed.c" -->
-ssi_end
-</pre></html>

+ 0 - 5
test/ssi3.shtml

@@ -1,5 +0,0 @@
-<html><pre>
-ssi_begin
-<!--#exec "ls -l" -->
-ssi_end
-</pre></html>

+ 0 - 5
test/ssi4.shtml

@@ -1,5 +0,0 @@
-<html><pre>
-ssi_begin
-<!--#exec "dir /w" -->
-ssi_end
-</pre></html>

+ 0 - 5
test/ssi5.shtml

@@ -1,5 +0,0 @@
-<html><pre>
-ssi_begin
-<!--#include abspath="/etc/passwd" -->
-ssi_end
-</pre></html>

+ 0 - 5
test/ssi6.shtml

@@ -1,5 +0,0 @@
-<html><pre>
-ssi_begin
-<!--#include abspath="c:\boot.ini" -->
-ssi_end
-</pre></html>

+ 0 - 6
test/ssi7.shtml

@@ -1,6 +0,0 @@
-
-<html><pre>
-ssi_begin
-<!--#include "embed.c" -->
-ssi_end
-</pre></html>

+ 0 - 1
test/ssi8.shtml

@@ -1 +0,0 @@
-<!--#include "ssi9.shtml" -->

+ 0 - 3
test/ssi9.shtml

@@ -1,3 +0,0 @@
-ssi_begin
-<!--#include file="../Makefile" -->
-ssi_end

+ 37 - 0
test/ssi_test.shtml

@@ -0,0 +1,37 @@
+<!doctype html>
+<html lang="en">
+<head>
+  <meta charset="utf-8">
+  <title>The HTML5 Herald</title>
+  <meta name="author" content="CivetWeb developers">
+  <meta name="description" content="CivetWeb Server Side Include (SSI) Test Page">
+</head>
+
+<body>
+  <h1>CivetWeb Server Side Include (SSI) Test Page</h1>
+  <p>Note: Some of the tests below will only work on Windows, others only on Linux, and some probably not on all Linux distributions and all Windows versions.</p>
+
+  <h2>Execute: "cd"</h2>
+  <!--#exec "cd" -->
+  <h2>Execute: "pwd"</h2>
+  <!--#exec "pwd" -->
+
+  <h2>File relative to current document: "hello.txt"</h2>
+  <!--#include file="hello.txt" -->
+  <h2>Short form: "hello.txt"</h2>
+  <!--#include "hello.txt" -->
+
+  <h2>File relative to document root: "hello.txt"</h2>
+  <!--#include virtual="hello.txt" -->
+
+  <h2>File with absolute path: "C:\Windows\system.ini"</h2>
+  <!--#include abspath="C:\Windows\system.ini" -->
+  <h2>File with absolute path: "/etc/issue"</h2>
+  <!--#include abspath="/etc/issue" -->
+
+  <h2>Nested file relative to current documentt: "hello.shtml"</h2>
+  <!--#include file="./hello.shtml" -->
+
+</body>
+</html>
+