Added more tests
This commit is contained in:
parent
feebfe65bb
commit
795935ddfb
7 changed files with 61 additions and 72 deletions
|
@ -5,17 +5,17 @@ import (
|
|||
"testing"
|
||||
)
|
||||
|
||||
func TestExamples(t *testing.T) {
|
||||
var tests = []struct {
|
||||
Name string
|
||||
ExpectedOutput string
|
||||
ExpectedExitCode int
|
||||
}{
|
||||
{"hello", "", 9},
|
||||
{"write", "ELF", 0},
|
||||
}
|
||||
var examples = []struct {
|
||||
Name string
|
||||
ExpectedOutput string
|
||||
ExpectedExitCode int
|
||||
}{
|
||||
{"hello", "", 9},
|
||||
{"write", "ELF", 0},
|
||||
}
|
||||
|
||||
for _, test := range tests {
|
||||
func TestExamples(t *testing.T) {
|
||||
for _, test := range examples {
|
||||
t.Run(test.Name, func(t *testing.T) {
|
||||
run(t, filepath.Join("..", "examples", test.Name), test.ExpectedOutput, test.ExpectedExitCode)
|
||||
})
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue