Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions publiccode-parser/publiccode_parser.go
Original file line number Diff line number Diff line change
Expand Up @@ -51,8 +51,8 @@ func run(args []string, stdout, stderr io.Writer) int {
}
localBasePathPtr := flags.String(
"path", "",
"Use this local directory as base path when checking for files existence "+
"instead of using the `url` key in publiccode.yml",
"Use this local `dir` as base path when checking for files existence "+
"instead of using the url key in publiccode.yml",
)
disableNetworkPtr := flags.Bool(
"no-network", false,
Expand Down
6 changes: 5 additions & 1 deletion publiccode-parser/publiccode_parser_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -143,12 +143,16 @@ func TestRunNoArgumentPrintsUsageOnStderr(t *testing.T) {
}

func TestRunHelpPrintsUsageOnStdout(t *testing.T) {
_, stdout, stderr := runCLI(t, "-help")
_, stdout, stderr := runCLI(t, "--help")

if !strings.HasPrefix(stdout, "Usage: publiccode-parser") {
t.Errorf("expected the usage on stdout, got %q", stdout)
}

if !strings.Contains(stdout, " -path dir\n") {
t.Errorf("expected the path value to be named dir, got %q", stdout)
}

if stderr != "" {
t.Errorf("expected no output on stderr, got %q", stderr)
}
Expand Down
Loading