Skip to content

Commit 1c2d9f9

Browse files
committed
fix test
1 parent 5eb3ec2 commit 1c2d9f9

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/param/param_test.go

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ import (
44
"context"
55
"flag"
66
"go-http-server/param"
7+
"path/filepath"
78
"testing"
89

910
"github.com/urfave/cli/v2"
@@ -63,7 +64,8 @@ func TestContextToParams(t *testing.T) {
6364
t.Errorf("Got %d, expected %d", params.Threshold, e_threshold)
6465
}
6566

66-
if params.Directory != e_directory {
67+
abs_directory, _ := filepath.Abs(e_directory)
68+
if params.Directory != abs_directory {
6769
t.Errorf("Got %s, expected %s", params.Directory, e_directory)
6870
}
6971

0 commit comments

Comments
 (0)