Assuming you copied/pasted your example, the - before the d is incorrect. I copied the the command lines from your post, notice how the - before the day expands differently.
$ echo -test | od -c0000000 - t e s t \n$ echo –d | od -c0000000 342 200 223 d \n