diff options
Diffstat (limited to 'cmd')
| -rw-r--r-- | cmd/krino/hostile_test.go | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/cmd/krino/hostile_test.go b/cmd/krino/hostile_test.go index 16a5b19..ad10ba8 100644 --- a/cmd/krino/hostile_test.go +++ b/cmd/krino/hostile_test.go @@ -50,7 +50,9 @@ func TestHostileNamesNeverReachTheTerminal(t *testing.T) { if err := os.Mkdir(bin, 0o755); err != nil { t.Fatal(err) } - tool := "#!/bin/sh\nprintf 'bad \\033[2Jpdf\\n' >&2\nexit 1\n" + // printf by its own PATH: PATH below holds only bin, and printf is not a + // shell builtin everywhere (OpenBSD). + tool := "#!/bin/sh\nPATH=/usr/bin:/bin\nprintf 'bad \\033[2Jpdf\\n' >&2\nexit 1\n" if err := os.WriteFile(filepath.Join(bin, "pdftotext"), []byte(tool), 0o755); err != nil { t.Fatal(err) } |
