1 #!/usr/bin/env bash
2 #
3 # Miscellaneous tests for the command language.
4
5 #### Command block
6 { which ls; }
7 ## stdout: /bin/ls
8
9 #### Permission denied
10 touch $TMP/text-file
11 $TMP/text-file
12 ## status: 126
13
14 #### Not a dir
15 $TMP/not-a-dir/text-file
16 ## status: 127
17
18 #### Name too long
19 ./0123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789
20 ## status: 127
21 ## OK dash status: 2
22 ## OK bash status: 126