mirror of
https://github.com/TangentFoxy/argparse.git
synced 2025-07-28 02:52:20 +00:00
Pad long usage messages
Long usage messages are split into lines. A margin is added so that they line up under "Usage: " part of the message.
This commit is contained in:
@@ -18,9 +18,10 @@ describe("tests related to usage message generation", function()
|
||||
parser:argument "others"
|
||||
:args "*"
|
||||
|
||||
assert.equal(
|
||||
[=[Usage: foo <first> <second-and-third> <second-and-third> [<maybe-fourth>] [<others>] ...]=],
|
||||
parser:prepare():get_usage()
|
||||
assert.equal(table.concat({
|
||||
"Usage: foo <first> <second-and-third> <second-and-third>",
|
||||
" [<maybe-fourth>] [<others>] ..."
|
||||
}, "\r\n"), parser:prepare():get_usage()
|
||||
)
|
||||
end)
|
||||
|
||||
|
Reference in New Issue
Block a user