util files moved form kern to util package
This commit is contained in:
@@ -12,7 +12,7 @@ import (
|
||||
"path"
|
||||
"testing"
|
||||
|
||||
"git.portale-stac.it/go-pkg/expr/kern"
|
||||
"git.portale-stac.it/go-pkg/expr/util"
|
||||
)
|
||||
|
||||
func TestExpandPathRootOk(t *testing.T) {
|
||||
@@ -21,7 +21,7 @@ func TestExpandPathRootOk(t *testing.T) {
|
||||
// wantErr := errors.New(`test expected string, got list ([])`)
|
||||
wantErr := error(nil)
|
||||
|
||||
gotValue, gotErr := kern.ExpandPath(source)
|
||||
gotValue, gotErr := util.ExpandPath(source)
|
||||
|
||||
if gotErr != nil && gotErr.Error() != wantErr.Error() {
|
||||
t.Errorf(`ExpandPath(%v) gotValue=%q, gotErr=%v -> wantValue=%q, wantErr=%v`,
|
||||
@@ -38,7 +38,7 @@ func TestExpandPathRootSubDirOk(t *testing.T) {
|
||||
// wantErr := errors.New(`test expected string, got list ([])`)
|
||||
wantErr := error(nil)
|
||||
|
||||
gotValue, gotErr := kern.ExpandPath(source)
|
||||
gotValue, gotErr := util.ExpandPath(source)
|
||||
|
||||
if gotErr != nil && gotErr.Error() != wantErr.Error() {
|
||||
t.Errorf(`ExpandPath(%v) gotValue=%q, gotErr=%v -> wantValue=%q, wantErr=%v`,
|
||||
@@ -56,7 +56,7 @@ func TestExpandPathUser(t *testing.T) {
|
||||
// wantErr := errors.New(`test expected string, got list ([])`)
|
||||
wantErr := error(nil)
|
||||
|
||||
gotValue, gotErr := kern.ExpandPath(source)
|
||||
gotValue, gotErr := util.ExpandPath(source)
|
||||
|
||||
if gotErr != nil {
|
||||
t.Errorf(`ExpandPath(%v) gotValue=%q, gotErr=%v -> wantValue=%q, wantErr=%v`,
|
||||
@@ -74,7 +74,7 @@ func TestExpandPathEnv(t *testing.T) {
|
||||
// wantErr := errors.New(`test expected string, got list ([])`)
|
||||
wantErr := error(nil)
|
||||
|
||||
gotValue, gotErr := kern.ExpandPath(source)
|
||||
gotValue, gotErr := util.ExpandPath(source)
|
||||
|
||||
if gotErr != nil {
|
||||
t.Errorf(`ExpandPath(%v) gotValue=%q, gotErr=%v -> wantValue=%q, wantErr=%v`,
|
||||
@@ -90,7 +90,7 @@ func TestExpandPathErr(t *testing.T) {
|
||||
wantValue := "~fake-user/test"
|
||||
wantErr := errors.New(`user: unknown user fake-user`)
|
||||
|
||||
gotValue, gotErr := kern.ExpandPath(source)
|
||||
gotValue, gotErr := util.ExpandPath(source)
|
||||
|
||||
if gotErr != nil && gotErr.Error() != wantErr.Error() {
|
||||
t.Errorf(`ExpandPath(%v) gotValue=%q, gotErr=%v -> wantValue=%q, wantErr=%v`,
|
||||
@@ -108,7 +108,7 @@ func TestExpandPathUserErr(t *testing.T) {
|
||||
// wantErr := errors.New(`test expected string, got list ([])`)
|
||||
wantErr := error(nil)
|
||||
|
||||
gotValue, gotErr := kern.ExpandPath(source)
|
||||
gotValue, gotErr := util.ExpandPath(source)
|
||||
|
||||
if gotErr != nil {
|
||||
t.Errorf(`ExpandPath(%v) gotValue=%q, gotErr=%v -> wantValue=%q, wantErr=%v`,
|
||||
|
||||
Reference in New Issue
Block a user