Remove unneeded tests.

These tests exercise the arity checking logic, which is implemented
generically for every builtin function and does not need to be tested
individually.
This commit is contained in:
Qi Xiao 2021-04-19 23:49:09 +01:00
parent 8f2accb0b9
commit a2ba33f6c5

View File

@ -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"
)
@ -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"),