added commandline and stdin tests using testscript

This commit is contained in:
2023-12-07 13:42:41 +01:00
parent d2db420837
commit d0376a63e3
22 changed files with 131 additions and 7 deletions

20
main_test.go Normal file
View File

@@ -0,0 +1,20 @@
package main
import (
"os"
"testing"
"github.com/rogpeppe/go-internal/testscript"
)
func TestMain(m *testing.M) {
os.Exit(testscript.RunMain(m, map[string]func() int{
"testrpn": Main,
}))
}
func TestRpn(t *testing.T) {
testscript.Run(t, testscript.Params{
Dir: "t",
})
}