which means that the argument of \includegraphics is expanded once. This is why the first test succeeds. In the second case it finds the file »\test«.
The above mentioned \filename@parse now calls \filename@path which in this case finds no directory specified and thus assumes the current path and calls \filename@simple#1.\\ which checks for an extension. It finds none and lets \filename@ext to \relax. It also defines \edef\filename@base{#1}. This is an \edef which means it's contents get fully expanded. That means that \filename@base is now picture.jpg.
These macros now are checked by \Ginclude@graphics. If \filename@ext is equal to \relax it looks for a match of \filename@base plus one of the allowed extensions. This would be picture.jpg.png, for example. Such a file does not exist so you get the error message. Without an extension this doesn't matter since \filename@base would be picture and it would find picture.jpg.