We prove the exponential law A(E × F, G) ∼ = A(E, A(F, G)) (bornological isomorphism) for the following classes A of test functions: B (globally bounded derivatives), W ∞, p (globally p-integrable derivatives), S (Schwartz space), D (compact support), B [M] (globally Denjoy-Carleman), W [M], p (Sobolev-Denjoy-Carleman), S [M] [L] (Gelfand-Shilov), and D [M] (Denjoy-Carleman with compact support). Here E, F, G are convenient vector spaces which are finite dimensional in the cases of D, W ∞, p , D [M] , and W [M], p . Moreover, 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 Diff B, Diff W ∞, p , Diff S, and Diff D are C ∞ Lie groups, and that Diff B {M} , Diff W {M}, p , Diff S {M} {L} , and Diff D {M} , for non-quasianalytic M, are C {M} Lie groups, where Diff A = {Id + f : f ∈ A(R n , R n ), inf x∈R n det(I n + d f (x)) > 0}. We also discuss stability under composition.