Refactored code structure

This commit is contained in:
Eduard Urbach 2024-07-03 11:39:24 +02:00
parent 9e52e2dd1c
commit fd6e874b44
Signed by: eduard
GPG key ID: 49226B848C78F6C8
54 changed files with 583 additions and 450 deletions

View file

@ -1,26 +0,0 @@
package build_test
import (
"path/filepath"
"testing"
"git.akyoto.dev/cli/q/src/build"
"git.akyoto.dev/go/assert"
)
func TestBuild(t *testing.T) {
b := build.New("../../examples/hello")
_, err := b.Run()
assert.Nil(t, err)
}
func TestExecutable(t *testing.T) {
b := build.New("../../examples/hello")
assert.Equal(t, filepath.Base(b.Executable()), "hello")
}
func TestNonExisting(t *testing.T) {
b := build.New("does-not-exist")
_, err := b.Run()
assert.NotNil(t, err)
}