Using xparse I want to create a command which defines other commands. However I want the secondary command to consist of text and then the argument to the first command. For example
For example in the following
\documentclass{article}
\usepackage{xparse}
\begin{document}
\ExplSyntaxOn
\DeclareDocumentCommand{\DeclareTest}{m}{%
%
\DeclareDocumentCommand{\csname test#1\endcsname}{}{This is a #1 test}
}
\ExplSyntaxOff
\DeclareTest{work}
\testwork
\end{document}
I would like \testwork to be a command that evaluates to This is a work test. However when I do this I get an "xparse/bad-arg-spec" error and I am not sure why.