slight modification of tests
All checks were successful
go/archiver/pipeline/head This commit looks good
All checks were successful
go/archiver/pipeline/head This commit looks good
This commit is contained in:
parent
f8bb088574
commit
1fa1d47e63
2 changed files with 2 additions and 0 deletions
|
@ -18,6 +18,7 @@ func TestGetGlobbedDir(t *testing.T) {
|
||||||
assertThat(t, extractGlobbedDir("/foo/bar/*", "/foo/bar/myDir/myFile.txt"), "myDir")
|
assertThat(t, extractGlobbedDir("/foo/bar/*", "/foo/bar/myDir/myFile.txt"), "myDir")
|
||||||
assertThat(t, extractGlobbedDir("/foo/bar/*/baz", "/foo/bar/myDir/baz/myFile.txt"), "myDir/baz")
|
assertThat(t, extractGlobbedDir("/foo/bar/*/baz", "/foo/bar/myDir/baz/myFile.txt"), "myDir/baz")
|
||||||
}
|
}
|
||||||
|
|
||||||
func assertThat[E comparable](t *testing.T, actual E, expected E) {
|
func assertThat[E comparable](t *testing.T, actual E, expected E) {
|
||||||
t.Helper()
|
t.Helper()
|
||||||
if actual != expected {
|
if actual != expected {
|
||||||
|
|
|
@ -12,6 +12,7 @@ func TestGetGlobRoot(t *testing.T) {
|
||||||
|
|
||||||
assertThat(t, getGlobRoot("foo\\bar\\*"), "foo\\bar")
|
assertThat(t, getGlobRoot("foo\\bar\\*"), "foo\\bar")
|
||||||
}
|
}
|
||||||
|
|
||||||
func assertThat[E comparable](t *testing.T, actual E, expected E) {
|
func assertThat[E comparable](t *testing.T, actual E, expected E) {
|
||||||
t.Helper()
|
t.Helper()
|
||||||
if actual != expected {
|
if actual != expected {
|
||||||
|
|
Loading…
Reference in a new issue