  We prove the exponential law $\mathcal A(E \times F, G) \cong \mathcal
A(E,\mathcal A(F,G))$ (bornological isomorphism) for the following classes
$\mathcal A$ of test functions: $\mathcal B$ (globally bounded derivatives),
$W^{\infty,p}$ (globally $p$-integrable derivatives), $\mathcal S$ (Schwartz
space), $\mathcal D$ (compact sport, $\mathcal B^{[M]}$ (globally
Denjoy_Carleman), $W^{[M],p}$ (Sobolev_Denjoy_Carleman), $\mathcal
S_{[L]}^{[M]}$ (Gelfand_Shilov), and $\mathcal D^{[M]}$. Here $E, F, G$ are
convenient vector spaces (finite dimensional in the cases of $W^{\infty,p}$,
$\mathcal D$, $W^{[M],p}$, and $\mathcal D^{[M]})$, and $M=(M_k)$ is a weakly
log-convex weight sequence of moderate growth. As application we give a new
simple proof of the fact that the groups of diffeomorphisms
$\operatorname{Diff} \mathcal B$, $\operatorname{Diff} W^{\infty,p}$,
$\operatorname{Diff} \mathcal S$, and $\operatorname{Diff}\mathcal D$ are
$C^\infty$ Lie groups, and $\operatorname{Diff} \mathcal B^{\{M\}}$,
$\operatorname{Diff}W^{\{M\},p}$, $\operatorname{Diff} \mathcal
S_{\{L\}}^{\{M\}}$, and $\operatorname{Diff}\mathcal D^{[M]}$, for
non-quasianalytic $M$, are $C^{\{M\}}$ Lie groups, where
$\operatorname{Diff}\mathcal A = \{\operatorname{Id} +f : f \in \mathcal
A(\mathbb R^n,\mathbb R^n), \inf_{x \in \mathbb R^n} \det(\mathbb I_n+
df(x))>0\}$. We also discuss stability under composition.
