Skip to content

Commit

Permalink
Restore a test
Browse files Browse the repository at this point in the history
  • Loading branch information
josephwright committed May 30, 2022
1 parent d370a44 commit 2a23183
Show file tree
Hide file tree
Showing 3 changed files with 35 additions and 47 deletions.
Empty file.
Expand Up @@ -71,55 +71,9 @@
}
{ }

\UseTemplate {test}{tname2}{key=don't say hi}{X} %still a bit strange
\UseTemplate {test}{tname2}{key=don't say hi}{X}
\UseTemplate {test}{tname2}{key=A}{X}
\UseTemplate {test}{tname2}{key=B}{X}

\ERROR
}



%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% 20
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

\TEST{Edit~instance~values}{

\DeclareInstance {test} {myinstance} {tname2} {}

\ShowInstanceValues {test} {myinstance}

\EditInstance {test} {myinstance} {int = 0 , key = B}

\ShowInstanceValues {test} {myinstance}

\UseInstance {test}{myinstance} {A}

\EditInstance {test} {myinstance} {int = 1, text = hi}

\UseInstance {test}{myinstance} {A}

\EditInstance {test} {myinstance} {}

\UseInstance {test}{myinstance} {A}

\EditInstance {test} {myinstance} {key = 1}

\EditInstance {notdefined} {myinstance} {key = 1}

\EditInstance {test} {myinstance} {key = 1}

\EditInstance {test} {myinstance} {key = A}

\UseInstance {test}{myinstance} {A}

\EditInstance {test} {myinstance} {key 2 = wrong}

\ShowInstanceValues {test} {myinstance}

\UseInstance {test}{myinstance} {A}
\ERROR instance editing should not depend on template and should not replace
template code
}
\END
34 changes: 34 additions & 0 deletions l3packages/xtemplate/testfiles/xtemplate004.tlg
@@ -0,0 +1,34 @@
This is a generated file for the LaTeX (2e + expl3) validation system.
Don't change this file in any respect.
Author: Frank Mittelbach
============================================================
TEST 1: Testing code interface: choices
============================================================
! Package xtemplate Error: The default choice 'key' was not declared for key
(xtemplate) 'key'.
For immediate help type H <return>.
...
l. ...}
The key 'key' takes a fixed list of choices and this list does not include
'key'.
Hi
hello
huh
Hi
! Package xtemplate Error: The default choice 'key' was not declared for key
(xtemplate) 'key'.
For immediate help type H <return>.
...
l. ...}
The key 'key' takes a fixed list of choices and this list does not include
'key'.
! Package xtemplate Error: The choice 'don'tsayhi' was not declared for key
(xtemplate) 'key'.
For immediate help type H <return>.
...
l. ...}
The key 'key' takes a fixed list of choices and this list does not include
'don'tsayhi'.
hello
huh
============================================================

0 comments on commit 2a23183

Please sign in to comment.