unit test for cmd_hash.go