mirror of
https://github.com/go-sylixos/elvish.git
synced 2024-12-12 17:27:50 +08:00
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:
parent
8f2accb0b9
commit
a2ba33f6c5
|
@ -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"),
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user