diff --git a/tests/showoff/tformatopt.nim b/tests/showoff/tformatopt.nim
new file mode 100644
index 000000000..f33ed6921
--- /dev/null
+++ b/tests/showoff/tformatopt.nim
@@ -0,0 +1,57 @@
+discard """
+ output: '''(a: 3
+b: 4
+s: abc
+)'''
+"""
+
+import macros
+
+proc invalidFormatString() =
+ echo "invalidFormatString"
+
+template formatImpl(handleChar: expr) =
+ var i = 0
+ while i < f.len:
+ if f[i] == '$':
+ case f[i+1]
+ of '1'..'9':
+ var j = 0
+ i += 1
+ while f[i] in {'0'..'9'}:
+ j = j * 10 + ord(f[i]) - ord('0')
+ i += 1
+ result.add(a[j-1])
+ else:
+ invalidFormatString()
+ else:
+ result.add(handleChar(f[i]))
+ i += 1
+
+proc `%`*(f: string, a: openArray[string]): string =
+ template identity(x: expr): expr = x
+ result = ""
+ formatImpl(identity)
+
+macro optFormat{`%`(f, a)}(f: string{lit}, a: openArray[string]): expr =
+ result = newNimNode(nnkBracket)
+ let f = f.strVal
+ formatImpl(newLit)
+ result = nestList(!"&", result)
+
+template optAdd1{x = y; add(x, z)}(x, y, z: string) =
+ x = y & z
+
+proc `/&` [T: object](x: T): string =
+ result = "("
+ for name, value in fieldPairs(x):
+ result.add("$1: $2\n" % [name, $value])
+ result.add(")")
+
+type
+ MyObject = object
+ a, b: int
+ s: string
+
+let obj = MyObject(a: 3, b: 4, s: "abc")
+echo(/&obj)
diff --git a/tests/showoff/thello2.nim b/tests/showoff/thello2.nim
new file mode 100644
index 000000000..d2e2f6227
--- /dev/null
+++ b/tests/showoff/thello2.nim
@@ -0,0 +1,11 @@
+discard """
+ output: '''(a: 3, b: 4, s: abc)'''
+"""
+
+type
+ MyObject = object
+ a, b: int
+ s: string
+
+let obj = MyObject(a: 3, b: 4, s: "abc")
+echo obj
diff --git a/tests/showoff/thtml1.nim b/tests/showoff/thtml1.nim
new file mode 100644
index 000000000..cd95c7971
--- /dev/null
+++ b/tests/showoff/thtml1.nim
@@ -0,0 +1,11 @@
+discard """
+ output: "
"
+"""
+
+template htmlTag(tag: expr) {.immediate.} =
+ proc tag(): string = "<" & astToStr(tag) & ">"
+
+htmlTag(br)
+htmlTag(html)
+
+echo br()
diff --git a/tests/showoff/thtml2.nim b/tests/showoff/thtml2.nim
new file mode 100644
index 000000000..8a451ebf1
--- /dev/null
+++ b/tests/showoff/thtml2.nim
@@ -0,0 +1,37 @@
+discard """
+ output: "