When teaching calculus, we instruct students to calculate multivariate limits using the following theorem:
If $\gamma$ is a smooth curve with $\gamma(0) = a \in \newcommand{\R}{\mathbb{R}}\R^n$ and $f: \R^n \to \R$ is continuous at $a$, then $f \circ \gamma$ is continuous at $0$ and $\lim_{t \to 0} (f \circ \gamma)(t) = \lim_{x \to a} f(x)$.
This also gives them a tool to show discontinuities in some functions: if they can find two curves $\gamma_1$ and $\gamma_2$ which give different limits upon restriction, then $f$ can't have been continuous at $a$. It's also instructive to point out that some generality for the choice of $\gamma$ is important: there are functions $f$ whose directional limits at $a$ all agree, but which aren't continuous because non-linear choices of $\gamma$ produce different values. (For instance, take $f$ to be the characteristic function of the graph of $y = x^2$, and set $a = 0$ --- all the directional limits are $0$, but pulling $f$ back along $\gamma(t) = (t, t^2)$ gives a function which is constant at $1$.)
My question is about sufficiency:
Question: Fix a point $a \in \R^n$ and suppose that $f: \R^n \to \R$ is a function with the property that for all smooth curves $\gamma: (-\varepsilon, \varepsilon) \to \R$ with $\gamma(0) = a$ the restriction $(f \circ \gamma): (-\varepsilon, \varepsilon) \to \R$ is continuous at $0$. Does it follow that $f$ is continuous at $a$?
If not, I'm interested in a counterexample. I'm also interested in what happens if I enlarge the class of curves $\gamma$ to include all $C^1$-functions --- maybe smoothness is too much to ask. Maybe it is also helpful to remark that there is a reduction to sequences: is there a sequence accumulating at $0$ with no accumulating subsequences admitting a smooth (resp., $C^1$) interpolant? If so, the characteristic function of this sequence gives a counterexample for $f$.