Skip to content

Commit

Permalink
cmd/gosh: add bad test case for #1100
Browse files Browse the repository at this point in the history
  • Loading branch information
mvdan committed Oct 8, 2024
1 parent 04e63a5 commit 4e19b5e
Showing 1 changed file with 15 additions and 0 deletions.
15 changes: 15 additions & 0 deletions cmd/gosh/main_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -175,6 +175,21 @@ var interactiveTests = []struct {
},
wantErr: "1:1: reached EOF without matching ( with )",
},
{
pairs: []string{
"gosh_alias arg || true\n",
"\"gosh_alias\": executable file not found in $PATH\n$ ",
// TODO: aliases should be expanded by default, gosh is an interactive shell
"alias gosh_alias=echo\n",
"$ ",
"gosh_alias arg || true\n",
"\"gosh_alias\": executable file not found in $PATH\n$ ",
"unalias gosh_alias\n",
"$ ",
"gosh_alias arg || true\n",
"\"gosh_alias\": executable file not found in $PATH\n$ ",
},
},
}

func TestInteractive(t *testing.T) {
Expand Down

0 comments on commit 4e19b5e

Please sign in to comment.