Skip to content

Commit

Permalink
Remove unneeded tests.
Browse files Browse the repository at this point in the history
These tests exercise the arity checking logic, which is implemented
generically for every builtin function and does not need to be tested
individually.
  • Loading branch information
xiaq committed Apr 19, 2021
1 parent 8f2accb commit a2ba33f
Showing 1 changed file with 0 additions and 21 deletions.
21 changes: 0 additions & 21 deletions pkg/eval/mods/file/file_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ import (
"testing"

"src.elv.sh/pkg/eval"
"src.elv.sh/pkg/eval/errs"
. "src.elv.sh/pkg/eval/evaltest"
"src.elv.sh/pkg/testutil"
)
Expand All @@ -20,26 +19,6 @@ func TestFile(t *testing.T) {
"echo haha > out3", "f = (file:open out3)",
"slurp < $f", "file:close $f").Puts("haha\n"),

That("file:open").Throws(
errs.ArityMismatch{
What: "arguments here",
ValidLow: 1, ValidHigh: 1, Actual: 0}),

That("file:close").Throws(
errs.ArityMismatch{
What: "arguments here",
ValidLow: 1, ValidHigh: 1, Actual: 0}),

That("file:prclose").Throws(
errs.ArityMismatch{
What: "arguments here",
ValidLow: 1, ValidHigh: 1, Actual: 0}),

That("file:pwclose").Throws(
errs.ArityMismatch{
What: "arguments here",
ValidLow: 1, ValidHigh: 1, Actual: 0}),

That(`p = (file:pipe)`, `echo haha > $p `, `pwclose $p`,
`slurp < $p`, `prclose $p`).Puts("haha\n"),

Expand Down

0 comments on commit a2ba33f

Please sign in to comment.