1

test is a bash builtin - called with no arguments, as in your example, it does nothing1.
Your shell script is not called test but test.sh, so to run it you need to type:
$ test.sh
1 Technically, it unsuccessfully does nothing (in other words, it returns a non-zero error code). If that means...