summaryrefslogtreecommitdiff
path: root/etc/srecode/test.srt
diff options
context:
space:
mode:
authorEric Ludlam <eric@siege-engine.com>2019-10-14 20:52:52 -0400
committerStefan Monnier <monnier@iro.umontreal.ca>2019-10-15 11:08:18 -0400
commit57a786db5a5c653172f994ff707f8eded3d92168 (patch)
tree09309ddc82e4202f7ee11b9539f5c0acc5d09a49 /etc/srecode/test.srt
parent3f8915a0192fe629dc985909c4acd5f80aa78b60 (diff)
downloademacs-57a786db5a5c653172f994ff707f8eded3d92168.tar.gz
emacs-57a786db5a5c653172f994ff707f8eded3d92168.tar.bz2
emacs-57a786db5a5c653172f994ff707f8eded3d92168.zip
Adapt the CEDET SRecoder template test to use ERT
These tests were copied from CEDET from SourceForge. Author: Eric Ludlam <zappo@gnu.org>
Diffstat (limited to 'etc/srecode/test.srt')
-rw-r--r--etc/srecode/test.srt76
1 files changed, 74 insertions, 2 deletions
diff --git a/etc/srecode/test.srt b/etc/srecode/test.srt
index 3bbc33e72dc..9689f8f111f 100644
--- a/etc/srecode/test.srt
+++ b/etc/srecode/test.srt
@@ -83,13 +83,13 @@ template gapsomething :blank
template inlinetext
"Insert text that has no newlines"
----
- *In the middle*
+*In the middle*
----
template includable :blank
----
;; An includable $COMMENT$ we could use.
-;; $^$
+;; $INPUTNAME$$^$
;; Text after a point inserter.
----
@@ -99,6 +99,8 @@ $>WI1:includable$
----
template wrapinclude-around
+sectiondictionary "WI1"
+set INPUTNAME "[VAR]"
----
$<WI1:includable$Intermediate Comments$/WI1$
----
@@ -145,4 +147,74 @@ OUTSIDE SECTION: $UTESTVAR1$
INSIDE SECTION: $#A$$UTESTVAR1$$/A$
----
+template custom-arg-w-arg :utestwitharg
+----
+Value of xformed UTWA: $UTESTARGXFORM$
+----
+
+template custom-arg-w-subdict :utestwitharg
+sectiondictionary "UTLOOP"
+set NAME "item1"
+sectiondictionary "UTLOOP"
+set NAME "item2"
+sectiondictionary "UTLOOP"
+set NAME "item3"
+----
+All items here: $FOO_item1$ $FOO_item2$ $FOO_item3$
+----
+
+template nested-dictionary-syntax-flat
+section "TOP"
+ show SUB
+ set NAME "item1"
+end
+----
+$#TOP$$#SUB$sub $/SUB$$NAME$$/TOP$
+----
+
+template nested-dictionary-syntax-nesting
+section "TOP"
+ show SHOW1
+ set NAME "item1"
+ section "SUB"
+ show SHOW11
+ set NAME "item11"
+ end
+ show SHOW2
+ set NAME "item2"
+ section "SUB"
+ show SHOW21
+ set NAME "item21"
+ end
+ show SHOW3
+ set NAME "item3"
+ section "SUB"
+ show SHOW11
+ set NAME "item31"
+ section "SUB"
+ show SHOW311
+ set NAME "item311"
+ end
+ section "SUB"
+ show SHOW321
+ set NAME "item321"
+ end
+ end
+end
+----
+$#TOP$$#SUB$$NAME$$#SUB$-$NAME$$/SUB$ $/SUB$$/TOP$
+----
+
+template nested-dictionary-syntax-mixed
+section "TOP"
+ show SUB
+ set NAME "item1"
+end
+sectiondictionary "SECTION"
+show SUB
+set NAME "item2"
+----
+$#TOP$$NAME$$/TOP$ $#SECTION$$NAME$$/SECTION$
+----
+
;; end