We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 31fa24b commit 49a79a4Copy full SHA for 49a79a4
1 file changed
test/parser.test.ts
@@ -91,6 +91,28 @@ describe("parseRawArgs", () => {
91
});
92
93
94
+ it("handles string values starting with a hyphen (#171)", () => {
95
+ const result = parseRawArgs(["--params", "-a 192.168.1.1 -b -c"], {
96
+ string: ["params"],
97
+ });
98
+
99
+ expect(result).toEqual({
100
+ _: [],
101
+ params: "-a 192.168.1.1 -b -c",
102
103
104
105
+ it("handles string value that is a single hyphen-prefixed token (#171)", () => {
106
+ const result = parseRawArgs(["--name", "-test"], {
107
+ string: ["name"],
108
109
110
111
112
+ name: "-test",
113
114
115
116
it("handles empty arguments", () => {
117
const result = parseRawArgs([], {});
118
0 commit comments