summary refs log tree commit diff stats
path: root/tests/accept/run
diff options
context:
space:
mode:
Diffstat (limited to 'tests/accept/run')
-rwxr-xr-xtests/accept/run/spec.csv1
-rw-r--r--tests/accept/run/tcgbug.nim17
-rwxr-xr-xtests/accept/run/txmlgen.nim6
-rwxr-xr-xtests/accept/run/txmltree.nim6
4 files changed, 27 insertions, 3 deletions
diff --git a/tests/accept/run/spec.csv b/tests/accept/run/spec.csv
index 0dc9a4baa..d537c139f 100755
--- a/tests/accept/run/spec.csv
+++ b/tests/accept/run/spec.csv
@@ -11,6 +11,7 @@ tbintree.nim;halloworld99110223
 tbug499771.nim;TSubRange: 5 from 1 to 10
 tbug511622.nim;3
 tcasestm.nim;ayyy
+tcgbug.nim;
 tclosure.nim;2 4 6 8 10
 tcnstseq.nim;AngelikaAnneAnnaAnkaAnja
 tconstr2.nim;69
diff --git a/tests/accept/run/tcgbug.nim b/tests/accept/run/tcgbug.nim
new file mode 100644
index 000000000..320821fb6
--- /dev/null
+++ b/tests/accept/run/tcgbug.nim
@@ -0,0 +1,17 @@
+
+type
+  TObj = object
+    x, y: int
+  PObj = ref TObj
+
+proc p(a: PObj) =
+  a.x = 0
+
+proc q(a: var PObj) =
+  a.p()
+
+var 
+  a: PObj
+new(a)
+q(a)
+
diff --git a/tests/accept/run/txmlgen.nim b/tests/accept/run/txmlgen.nim
new file mode 100755
index 000000000..56ca42d53
--- /dev/null
+++ b/tests/accept/run/txmlgen.nim
@@ -0,0 +1,6 @@
+import xmlgen
+
+var nim = "Nimrod"
+echo h1(a(href="http://force7.de/nimrod", nim))
+
+
diff --git a/tests/accept/run/txmltree.nim b/tests/accept/run/txmltree.nim
index efd7b07af..2e5f52576 100755
--- a/tests/accept/run/txmltree.nim
+++ b/tests/accept/run/txmltree.nim
@@ -1,7 +1,7 @@
 
-import xmltree
+import xmltree, strtabs
 
-var x = <>a(href="nimrod.de", "www.nimrod-test.de")
+var x = <>a(href="nimrod.de", newText("www.nimrod-test.de"))
 
-echo x == "<a href=\"nimrod.de\">www.nimrod-test.de"
+echo($x == "<a href=\"nimrod.de\">www.nimrod-test.de</a>")