Skip to content

Commit 7cbfd05

Browse files
committed
test: cover bare --, --flag=value, and -1 in backtickFlags
1 parent d09f82a commit 7cbfd05

1 file changed

Lines changed: 15 additions & 0 deletions

File tree

internal/docgen/mintlify_test.go

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -278,6 +278,21 @@ func TestBacktickFlags(t *testing.T) {
278278
input: "use -h for help",
279279
want: "use `-h` for help",
280280
},
281+
{
282+
name: "bare double-dash is not a flag",
283+
input: "use -- to separate flags from args",
284+
want: "use -- to separate flags from args",
285+
},
286+
{
287+
name: "flag with equals value",
288+
input: "use --output=json here",
289+
want: "use `--output`=json here",
290+
},
291+
{
292+
name: "numeric arg is not a flag",
293+
input: "use -1 for default",
294+
want: "use -1 for default",
295+
},
281296
}
282297
for _, tt := range tests {
283298
t.Run(tt.name, func(t *testing.T) {

0 commit comments

Comments
 (0)