From 2642c1da70d5f1e26fda2cfee0deb2fa88b43b71 Mon Sep 17 00:00:00 2001 From: nyamatongwe Date: Tue, 12 May 2009 23:39:51 +0000 Subject: Include tests in standard repository. --- test/examples/x.asp | 12 ++++++++++++ test/examples/x.asp.styled | 12 ++++++++++++ test/examples/x.cxx | 4 ++++ test/examples/x.cxx.styled | 4 ++++ test/examples/x.html | 7 +++++++ test/examples/x.html.styled | 7 +++++++ test/examples/x.php | 6 ++++++ test/examples/x.php.styled | 6 ++++++ test/examples/x.py | 11 +++++++++++ test/examples/x.py.styled | 11 +++++++++++ test/examples/x.vb | 9 +++++++++ test/examples/x.vb.styled | 9 +++++++++ 12 files changed, 98 insertions(+) create mode 100644 test/examples/x.asp create mode 100644 test/examples/x.asp.styled create mode 100644 test/examples/x.cxx create mode 100644 test/examples/x.cxx.styled create mode 100644 test/examples/x.html create mode 100644 test/examples/x.html.styled create mode 100644 test/examples/x.php create mode 100644 test/examples/x.php.styled create mode 100644 test/examples/x.py create mode 100644 test/examples/x.py.styled create mode 100644 test/examples/x.vb create mode 100644 test/examples/x.vb.styled (limited to 'test/examples') diff --git a/test/examples/x.asp b/test/examples/x.asp new file mode 100644 index 000000000..a78acdc34 --- /dev/null +++ b/test/examples/x.asp @@ -0,0 +1,12 @@ +<%@language=javas%> +<% +#include +function x() { +} +%> +<%@language=vbscript%> +<% +sub x 'comment +%> + + diff --git a/test/examples/x.asp.styled b/test/examples/x.asp.styled new file mode 100644 index 000000000..920c6380d --- /dev/null +++ b/test/examples/x.asp.styled @@ -0,0 +1,12 @@ +{15}<%@{16}language=javas{15}%>{0} +{15}<%{56} +#{61}include{56} +{62}function{56} {61}x{65}(){56} {65}{{56} +{65}}{56} +{15}%>{0} +{15}<%@{16}language=vbscript{15}%>{0} +{15}<%{81} +{84}sub{81} {86}x{81} {82}'comment {81} +{15}%>{0} +{1}{0} +{1}{0} diff --git a/test/examples/x.cxx b/test/examples/x.cxx new file mode 100644 index 000000000..255a70e7c --- /dev/null +++ b/test/examples/x.cxx @@ -0,0 +1,4 @@ +// A demonstration program +int main() { + printf("hello world %d\n", 9); +} diff --git a/test/examples/x.cxx.styled b/test/examples/x.cxx.styled new file mode 100644 index 000000000..223ee0760 --- /dev/null +++ b/test/examples/x.cxx.styled @@ -0,0 +1,4 @@ +{2}// A demonstration program +{5}int{0} {11}main{10}(){0} {10}{{0} + {11}printf{10}({6}"hello world %d\n"{10},{0} {4}9{10});{0} +{10}}{0} diff --git a/test/examples/x.html b/test/examples/x.html new file mode 100644 index 000000000..1d325dc76 --- /dev/null +++ b/test/examples/x.html @@ -0,0 +1,7 @@ + + + + SinkWorld - Portability + SinkWorld - Portability + + diff --git a/test/examples/x.html.styled b/test/examples/x.html.styled new file mode 100644 index 000000000..3bcb7bca1 --- /dev/null +++ b/test/examples/x.html.styled @@ -0,0 +1,7 @@ +{1}{0} +{1}{0} + {1}{0} + {1}{0}SinkWorld - Portability{1}{0} + {2}{0}SinkWorld - Portability{2}{0} + {1}{0} +{1}{0} diff --git a/test/examples/x.php b/test/examples/x.php new file mode 100644 index 000000000..bc7302d85 --- /dev/null +++ b/test/examples/x.php @@ -0,0 +1,6 @@ + +\n"; +/* ?> */ +?> +forif diff --git a/test/examples/x.php.styled b/test/examples/x.php.styled new file mode 100644 index 000000000..fb90ba06e --- /dev/null +++ b/test/examples/x.php.styled @@ -0,0 +1,6 @@ +{1}{0} {9}{0} +{18}\n"{127};{118} +{124}/* ?> */{118} +{18}?>{0} +{1}{0}for{1}{0}if{1}{0} diff --git a/test/examples/x.py b/test/examples/x.py new file mode 100644 index 000000000..12c4b71df --- /dev/null +++ b/test/examples/x.py @@ -0,0 +1,11 @@ +# Convert all punctuation characters except '_', '*', and '.' into spaces. +def depunctuate(s): + '''A docstring''' + """Docstring 2""" + d = "" + for ch in s: + if ch in 'abcde': + d = d + ch + else: + d = d + " " + return d diff --git a/test/examples/x.py.styled b/test/examples/x.py.styled new file mode 100644 index 000000000..02f94a923 --- /dev/null +++ b/test/examples/x.py.styled @@ -0,0 +1,11 @@ +{1}# Convert all punctuation characters except '_', '*', and '.' into spaces.{0} +{5}def{0} {9}depunctuate{10}({11}s{10}):{0} + {6}'''A docstring'''{0} + {7}"""Docstring 2"""{0} + {11}d{0} {10}={0} {3}""{0} + {5}for{0} {11}ch{0} {5}in{0} {11}s{10}:{0} + {5}if{0} {11}ch{0} {5}in{0} {4}'abcde'{10}:{0} + {11}d{0} {10}={0} {11}d{0} {10}+{0} {11}ch{0} + {5}else{10}:{0} + {11}d{0} {10}={0} {11}d{0} {10}+{0} {3}" "{0} + {5}return{0} {11}d{0} diff --git a/test/examples/x.vb b/test/examples/x.vb new file mode 100644 index 000000000..a4503704b --- /dev/null +++ b/test/examples/x.vb @@ -0,0 +1,9 @@ +' String" +Dim a As String = "hello, world" +Dim b As String = "hello world" +Dim c As String = "Joe said ""Hello"" to me" +Dim d As String = "\\\\server\\share\\file.txt" +' Character +""C "c"C "cc"C +' Date +d = #5/31/1993# or # 01/01/0001 12:00:00AM # diff --git a/test/examples/x.vb.styled b/test/examples/x.vb.styled new file mode 100644 index 000000000..e0c86f918 --- /dev/null +++ b/test/examples/x.vb.styled @@ -0,0 +1,9 @@ +{1}' String" +{3}Dim{0} {7}a{0} {3}As{0} {3}String{0} {6}={0} {4}"hello, world"{0} +{3}Dim{0} {7}b{0} {3}As{0} {3}String{0} {6}={0} {4}"hello world"{0} +{3}Dim{0} {7}c{0} {3}As{0} {3}String{0} {6}={0} {4}"Joe said ""Hello"" to me"{0} +{3}Dim{0} {7}d{0} {3}As{0} {3}String{0} {6}={0} {4}"\\\\server\\share\\file.txt"{0} +{1}' Character +{4}""C{0} {4}"c"C{0} {4}"cc"C{0} +{1}' Date +{7}d{0} {6}={0} {8}#5/31/1993#{0} {3}or{0} {8}# 01/01/0001 12:00:00AM #{0} -- cgit v1.2.3