# xspace inserts a space when used inside \enquote

Am I wrong in thinking that \xspace should not introduce a space when used inside an \enquote command as used in the following MWE? And how can I get the two to work together?

\documentclass{article}
\usepackage{csquotes}
\usepackage{xspace}

\newcommand{\test}{test\xspace}

\begin{document}
\test. \test, \test'' \test \enquote{\test} \test \enquote{\test}.
\end{document}


You can add csquotes end of argument marker to the xspace list of exceptions:

\documentclass{article}
\usepackage{csquotes}
\usepackage{xspace}
\makeatletter
\test. \test, \test'' \test \enquote{\test} \test \enquote{\test}.