Implemented error messages
This commit is contained in:
parent
423526e567
commit
e3b26c79f4
16 changed files with 362 additions and 60 deletions
|
@ -1,6 +1,7 @@
|
|||
package build_test
|
||||
|
||||
import (
|
||||
"path/filepath"
|
||||
"testing"
|
||||
|
||||
"git.akyoto.dev/cli/q/src/build"
|
||||
|
@ -9,16 +10,17 @@ import (
|
|||
|
||||
func TestBuild(t *testing.T) {
|
||||
b := build.New("../../examples/hello")
|
||||
assert.Nil(t, b.Run())
|
||||
_, err := b.Run()
|
||||
assert.Nil(t, err)
|
||||
}
|
||||
|
||||
func TestSkipExecutable(t *testing.T) {
|
||||
func TestExecutable(t *testing.T) {
|
||||
b := build.New("../../examples/hello")
|
||||
b.WriteExecutable = false
|
||||
assert.Nil(t, b.Run())
|
||||
assert.Equal(t, filepath.Base(b.Executable()), "hello")
|
||||
}
|
||||
|
||||
func TestNonExisting(t *testing.T) {
|
||||
b := build.New("does-not-exist")
|
||||
assert.NotNil(t, b.Run())
|
||||
_, err := b.Run()
|
||||
assert.NotNil(t, err)
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue