forked from Plemya-x/ALR
		
	test: fix decoder and handlers tests
This commit is contained in:
		| @@ -27,10 +27,10 @@ import ( | |||||||
| 	"strings" | 	"strings" | ||||||
| 	"testing" | 	"testing" | ||||||
|  |  | ||||||
| 	"plemya-x.ru/alr/internal/shutils/decoder" |  | ||||||
| 	"plemya-x.ru/alr/pkg/distro" |  | ||||||
| 	"mvdan.cc/sh/v3/interp" | 	"mvdan.cc/sh/v3/interp" | ||||||
| 	"mvdan.cc/sh/v3/syntax" | 	"mvdan.cc/sh/v3/syntax" | ||||||
|  | 	"plemya-x.ru/alr/internal/shutils/decoder" | ||||||
|  | 	"plemya-x.ru/alr/pkg/distro" | ||||||
| ) | ) | ||||||
|  |  | ||||||
| type BuildVars struct { | type BuildVars struct { | ||||||
| @@ -56,7 +56,7 @@ const testScript = ` | |||||||
| 	release=1 | 	release=1 | ||||||
| 	epoch=2 | 	epoch=2 | ||||||
| 	desc="Test package" | 	desc="Test package" | ||||||
| 	homepage='//https://gitea.plemya-x.ru/xpamych/ALR' | 	homepage='https://gitea.plemya-x.ru/xpamych/ALR' | ||||||
| 	maintainer='Евгений Храмов <xpamych@yandex.ru>' | 	maintainer='Евгений Храмов <xpamych@yandex.ru>' | ||||||
| 	architectures=('arm64' 'amd64') | 	architectures=('arm64' 'amd64') | ||||||
| 	license=('GPL-3.0-or-later') | 	license=('GPL-3.0-or-later') | ||||||
|   | |||||||
| @@ -23,11 +23,11 @@ import ( | |||||||
| 	"strings" | 	"strings" | ||||||
| 	"testing" | 	"testing" | ||||||
|  |  | ||||||
| 	"plemya-x.ru/alr/internal/shutils/handlers" |  | ||||||
| 	"plemya-x.ru/alr/internal/shutils/decoder" |  | ||||||
| 	"plemya-x.ru/alr/pkg/distro" |  | ||||||
| 	"mvdan.cc/sh/v3/interp" | 	"mvdan.cc/sh/v3/interp" | ||||||
| 	"mvdan.cc/sh/v3/syntax" | 	"mvdan.cc/sh/v3/syntax" | ||||||
|  | 	"plemya-x.ru/alr/internal/shutils/decoder" | ||||||
|  | 	"plemya-x.ru/alr/internal/shutils/handlers" | ||||||
|  | 	"plemya-x.ru/alr/pkg/distro" | ||||||
| ) | ) | ||||||
|  |  | ||||||
| const testScript = ` | const testScript = ` | ||||||
| @@ -89,7 +89,7 @@ func TestExecFuncs(t *testing.T) { | |||||||
| 		t.Fatalf("Expected test() function to exist") | 		t.Fatalf("Expected test() function to exist") | ||||||
| 	} | 	} | ||||||
|  |  | ||||||
| 	eh := shutils.ExecFuncs{ | 	eh := handlers.ExecFuncs{ | ||||||
| 		"test-cmd": func(hc interp.HandlerContext, name string, args []string) error { | 		"test-cmd": func(hc interp.HandlerContext, name string, args []string) error { | ||||||
| 			if name != "test-cmd" { | 			if name != "test-cmd" { | ||||||
| 				t.Errorf("Expected name to be 'test-cmd', got '%s'", name) | 				t.Errorf("Expected name to be 'test-cmd', got '%s'", name) | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user