aboutsummaryrefslogtreecommitdiff
path: root/idsearcher
diff options
context:
space:
mode:
authorCatalin Stratu <catalinstratu45@gmail.com>2022-03-14 15:47:57 +0200
committerCatalin Stratu <catalinstratu45@gmail.com>2022-03-15 11:24:39 +0200
commitafab6dd30beb70ad7dbc8d5f602e5f52d12abc85 (patch)
tree5dd0ccf4686120011acb2657426e4446df00bdcc /idsearcher
parent673cb49f3e5472b269747dc14ef132caf9032050 (diff)
downloadspdx-tools-afab6dd30beb70ad7dbc8d5f602e5f52d12abc85.tar.gz
test fixes
Signed-off-by: Catalin Stratu <catalinstratu45@gmail.com>
Diffstat (limited to 'idsearcher')
-rw-r--r--idsearcher/idsearcher_test.go32
1 files changed, 16 insertions, 16 deletions
diff --git a/idsearcher/idsearcher_test.go b/idsearcher/idsearcher_test.go
index f348dc7..a54b26c 100644
--- a/idsearcher/idsearcher_test.go
+++ b/idsearcher/idsearcher_test.go
@@ -214,8 +214,8 @@ func Test2_1SearcherCanFillInIDsAndIgnorePaths(t *testing.T) {
}
f := pkg.Files[spdx.ElementID("File0")]
- if f.FileName != "/dontscan.txt" {
- t.Errorf("expected %v, got %v", "/dontscan.txt", f.FileName)
+ if f.FileName != "./dontscan.txt" {
+ t.Errorf("expected %v, got %v", "./dontscan.txt", f.FileName)
}
if len(f.LicenseInfoInFile) != 1 {
t.Errorf("expected len to be %d, got %d", 1, len(f.LicenseInfoInFile))
@@ -228,8 +228,8 @@ func Test2_1SearcherCanFillInIDsAndIgnorePaths(t *testing.T) {
}
f = pkg.Files[spdx.ElementID("File1")]
- if f.FileName != "/keep/keep.txt" {
- t.Errorf("expected %v, got %v", "/keep/keep.txt", f.FileName)
+ if f.FileName != "../keep/keep.txt" {
+ t.Errorf("expected %v, got %v", "./keep/keep.txt", f.FileName)
}
if len(f.LicenseInfoInFile) != 1 {
t.Errorf("expected len to be %d, got %d", 1, len(f.LicenseInfoInFile))
@@ -242,8 +242,8 @@ func Test2_1SearcherCanFillInIDsAndIgnorePaths(t *testing.T) {
}
f = pkg.Files[spdx.ElementID("File2")]
- if f.FileName != "/keep.txt" {
- t.Errorf("expected %v, got %v", "/keep.txt", f.FileName)
+ if f.FileName != "./keep.txt" {
+ t.Errorf("expected %v, got %v", "./keep.txt", f.FileName)
}
if len(f.LicenseInfoInFile) != 1 {
t.Errorf("expected len to be %d, got %d", 1, len(f.LicenseInfoInFile))
@@ -256,8 +256,8 @@ func Test2_1SearcherCanFillInIDsAndIgnorePaths(t *testing.T) {
}
f = pkg.Files[spdx.ElementID("File3")]
- if f.FileName != "/subdir/keep/dontscan.txt" {
- t.Errorf("expected %v, got %v", "/subdir/keep/dontscan.txt", f.FileName)
+ if f.FileName != "./subdir/keep/dontscan.txt" {
+ t.Errorf("expected %v, got %v", "./subdir/keep/dontscan.txt", f.FileName)
}
if len(f.LicenseInfoInFile) != 1 {
t.Errorf("expected len to be %d, got %d", 1, len(f.LicenseInfoInFile))
@@ -270,8 +270,8 @@ func Test2_1SearcherCanFillInIDsAndIgnorePaths(t *testing.T) {
}
f = pkg.Files[spdx.ElementID("File4")]
- if f.FileName != "/subdir/keep/keep.txt" {
- t.Errorf("expected %v, got %v", "/subdir/keep/keep.txt", f.FileName)
+ if f.FileName != "./subdir/keep/keep.txt" {
+ t.Errorf("expected %v, got %v", "./subdir/keep/keep.txt", f.FileName)
}
if len(f.LicenseInfoInFile) != 1 {
t.Errorf("expected len to be %d, got %d", 1, len(f.LicenseInfoInFile))
@@ -503,8 +503,8 @@ func Test2_2SearcherCanFillInIDsAndIgnorePaths(t *testing.T) {
}
f := pkg.Files[spdx.ElementID("File0")]
- if f.FileName != "/dontscan.txt" {
- t.Errorf("expected %v, got %v", "/dontscan.txt", f.FileName)
+ if f.FileName != "./dontscan.txt" {
+ t.Errorf("expected %v, got %v", "./dontscan.txt", f.FileName)
}
if len(f.LicenseInfoInFile) != 1 {
t.Errorf("expected len to be %d, got %d", 1, len(f.LicenseInfoInFile))
@@ -545,8 +545,8 @@ func Test2_2SearcherCanFillInIDsAndIgnorePaths(t *testing.T) {
}
f = pkg.Files[spdx.ElementID("File3")]
- if f.FileName != "/subdir/keep/dontscan.txt" {
- t.Errorf("expected %v, got %v", "/subdir/keep/dontscan.txt", f.FileName)
+ if f.FileName != "./subdir/keep/dontscan.txt" {
+ t.Errorf("expected %v, got %v", "./subdir/keep/dontscan.txt", f.FileName)
}
if len(f.LicenseInfoInFile) != 1 {
t.Errorf("expected len to be %d, got %d", 1, len(f.LicenseInfoInFile))
@@ -559,8 +559,8 @@ func Test2_2SearcherCanFillInIDsAndIgnorePaths(t *testing.T) {
}
f = pkg.Files[spdx.ElementID("File4")]
- if f.FileName != "/subdir/keep/keep.txt" {
- t.Errorf("expected %v, got %v", "/subdir/keep/keep.txt", f.FileName)
+ if f.FileName != "./subdir/keep/keep.txt" {
+ t.Errorf("expected %v, got %v", "./subdir/keep/keep.txt", f.FileName)
}
if len(f.LicenseInfoInFile) != 1 {
t.Errorf("expected len to be %d, got %d", 1, len(f.LicenseInfoInFile))