Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Renamed the builtin-signature, again. #121

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
138 changes: 69 additions & 69 deletions builtins/builtins.go

Large diffs are not rendered by default.

10 changes: 5 additions & 5 deletions builtins/builtins_shell_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ import (
func TestShell(t *testing.T) {

// calling with no argument
out := shellFn(ENV, []primitive.Primitive{})
out := shellFn(nil, ENV, []primitive.Primitive{})

// Will lead to an error
_, ok := out.(primitive.Error)
Expand All @@ -24,7 +24,7 @@ func TestShell(t *testing.T) {
}

// One argument, but the wrong type
out = shellFn(ENV, []primitive.Primitive{
out = shellFn(nil, ENV, []primitive.Primitive{
primitive.Number(3),
})

Expand All @@ -44,7 +44,7 @@ func TestShell(t *testing.T) {
cmd = append(cmd, primitive.String("bar"))

// Run the command
res := shellFn(ENV, []primitive.Primitive{cmd})
res := shellFn(nil, ENV, []primitive.Primitive{cmd})

// Response should be a list
lst, ok2 := res.(primitive.List)
Expand All @@ -64,7 +64,7 @@ func TestShell(t *testing.T) {
fail = append(fail, primitive.String("/fdsf/fdsf/-path-not/exists"))

// Run the command
out = shellFn(ENV, []primitive.Primitive{fail})
out = shellFn(nil, ENV, []primitive.Primitive{fail})

// Will lead to an error
_, ok = out.(primitive.Error)
Expand All @@ -79,7 +79,7 @@ func TestShell(t *testing.T) {
//
old := os.Getenv("FUZZ")
os.Setenv("FUZZ", "FUZZ")
res = shellFn(ENV, []primitive.Primitive{cmd})
res = shellFn(nil, ENV, []primitive.Primitive{cmd})
os.Setenv("FUZZ", old)

// Response should still be a list
Expand Down
Loading