diff options
| author | Eric Ludlam | 2019-10-14 20:52:52 -0400 |
|---|---|---|
| committer | Stefan Monnier | 2019-10-15 11:08:18 -0400 |
| commit | 57a786db5a5c653172f994ff707f8eded3d92168 (patch) | |
| tree | 09309ddc82e4202f7ee11b9539f5c0acc5d09a49 /etc/srecode/test.srt | |
| parent | 3f8915a0192fe629dc985909c4acd5f80aa78b60 (diff) | |
| download | emacs-57a786db5a5c653172f994ff707f8eded3d92168.tar.gz 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.srt | 76 |
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 | |||
| 83 | template inlinetext | 83 | template inlinetext |
| 84 | "Insert text that has no newlines" | 84 | "Insert text that has no newlines" |
| 85 | ---- | 85 | ---- |
| 86 | *In the middle* | 86 | *In the middle* |
| 87 | ---- | 87 | ---- |
| 88 | 88 | ||
| 89 | template includable :blank | 89 | template includable :blank |
| 90 | ---- | 90 | ---- |
| 91 | ;; An includable $COMMENT$ we could use. | 91 | ;; An includable $COMMENT$ we could use. |
| 92 | ;; $^$ | 92 | ;; $INPUTNAME$$^$ |
| 93 | ;; Text after a point inserter. | 93 | ;; Text after a point inserter. |
| 94 | ---- | 94 | ---- |
| 95 | 95 | ||
| @@ -99,6 +99,8 @@ $>WI1:includable$ | |||
| 99 | ---- | 99 | ---- |
| 100 | 100 | ||
| 101 | template wrapinclude-around | 101 | template wrapinclude-around |
| 102 | sectiondictionary "WI1" | ||
| 103 | set INPUTNAME "[VAR]" | ||
| 102 | ---- | 104 | ---- |
| 103 | $<WI1:includable$Intermediate Comments$/WI1$ | 105 | $<WI1:includable$Intermediate Comments$/WI1$ |
| 104 | ---- | 106 | ---- |
| @@ -145,4 +147,74 @@ OUTSIDE SECTION: $UTESTVAR1$ | |||
| 145 | INSIDE SECTION: $#A$$UTESTVAR1$$/A$ | 147 | INSIDE SECTION: $#A$$UTESTVAR1$$/A$ |
| 146 | ---- | 148 | ---- |
| 147 | 149 | ||
| 150 | template custom-arg-w-arg :utestwitharg | ||
| 151 | ---- | ||
| 152 | Value of xformed UTWA: $UTESTARGXFORM$ | ||
| 153 | ---- | ||
| 154 | |||
| 155 | template custom-arg-w-subdict :utestwitharg | ||
| 156 | sectiondictionary "UTLOOP" | ||
| 157 | set NAME "item1" | ||
| 158 | sectiondictionary "UTLOOP" | ||
| 159 | set NAME "item2" | ||
| 160 | sectiondictionary "UTLOOP" | ||
| 161 | set NAME "item3" | ||
| 162 | ---- | ||
| 163 | All items here: $FOO_item1$ $FOO_item2$ $FOO_item3$ | ||
| 164 | ---- | ||
| 165 | |||
| 166 | template nested-dictionary-syntax-flat | ||
| 167 | section "TOP" | ||
| 168 | show SUB | ||
| 169 | set NAME "item1" | ||
| 170 | end | ||
| 171 | ---- | ||
| 172 | $#TOP$$#SUB$sub $/SUB$$NAME$$/TOP$ | ||
| 173 | ---- | ||
| 174 | |||
| 175 | template nested-dictionary-syntax-nesting | ||
| 176 | section "TOP" | ||
| 177 | show SHOW1 | ||
| 178 | set NAME "item1" | ||
| 179 | section "SUB" | ||
| 180 | show SHOW11 | ||
| 181 | set NAME "item11" | ||
| 182 | end | ||
| 183 | show SHOW2 | ||
| 184 | set NAME "item2" | ||
| 185 | section "SUB" | ||
| 186 | show SHOW21 | ||
| 187 | set NAME "item21" | ||
| 188 | end | ||
| 189 | show SHOW3 | ||
| 190 | set NAME "item3" | ||
| 191 | section "SUB" | ||
| 192 | show SHOW11 | ||
| 193 | set NAME "item31" | ||
| 194 | section "SUB" | ||
| 195 | show SHOW311 | ||
| 196 | set NAME "item311" | ||
| 197 | end | ||
| 198 | section "SUB" | ||
| 199 | show SHOW321 | ||
| 200 | set NAME "item321" | ||
| 201 | end | ||
| 202 | end | ||
| 203 | end | ||
| 204 | ---- | ||
| 205 | $#TOP$$#SUB$$NAME$$#SUB$-$NAME$$/SUB$ $/SUB$$/TOP$ | ||
| 206 | ---- | ||
| 207 | |||
| 208 | template nested-dictionary-syntax-mixed | ||
| 209 | section "TOP" | ||
| 210 | show SUB | ||
| 211 | set NAME "item1" | ||
| 212 | end | ||
| 213 | sectiondictionary "SECTION" | ||
| 214 | show SUB | ||
| 215 | set NAME "item2" | ||
| 216 | ---- | ||
| 217 | $#TOP$$NAME$$/TOP$ $#SECTION$$NAME$$/SECTION$ | ||
| 218 | ---- | ||
| 219 | |||
| 148 | ;; end | 220 | ;; end |