diff --git a/R/command-args.R b/R/command-args.R index 43e2df0..de1acef 100644 --- a/R/command-args.R +++ b/R/command-args.R @@ -115,7 +115,7 @@ ca_help <- function(self) { args <- apply(args, 1L, paste, sep = "\n", collapse = " ") usage <- two_column(bn, ca_write_usage(self)) - usage <- apply(Reduce(cbind, usage), 1L, paste, collapse = "") + usage <- apply(Reduce(cbind, usage), 1L, paste, collapse = " ") print_lines( "{scribe} command_args", diff --git a/tests/testthat/_snaps/class-command-args.md b/tests/testthat/_snaps/class-command-args.md index 50066a1..0cc9e57 100644 --- a/tests/testthat/_snaps/class-command-args.md +++ b/tests/testthat/_snaps/class-command-args.md @@ -12,7 +12,7 @@ USAGE {command} [--help | --version] - {command} + {command} ARGUMENTS --help prints this and quietly exits @@ -34,7 +34,7 @@ USAGE {command} [--help | --version] - {command} + {command} ARGUMENTS --help prints this and quietly exits @@ -54,7 +54,7 @@ USAGE {command} [--help | --version] - {command} + {command} ARGUMENTS --help prints this and quietly exits @@ -74,7 +74,7 @@ USAGE {command} [--help | --version] - {command} + {command} ARGUMENTS --help prints this and quietly exits @@ -91,7 +91,7 @@ USAGE {command} [--help | --version] - {command} + {command} ARGUMENTS --help prints this and quietly exits @@ -112,7 +112,7 @@ USAGE {command} [--help | --version] - {command} + {command} ARGUMENTS --help prints this and quietly exits @@ -129,7 +129,7 @@ USAGE {command} [--help | --version] - {command} + {command} ARGUMENTS --help prints this and quietly exits @@ -162,7 +162,7 @@ USAGE {command} [--help | --version] - {command} + {command} ARGUMENTS --help prints this and quietly exits diff --git a/tests/testthat/test-scripts.R b/tests/testthat/test-scripts.R index 1993e71..6966609 100644 --- a/tests/testthat/test-scripts.R +++ b/tests/testthat/test-scripts.R @@ -14,13 +14,13 @@ test_that("help works", { "", "USAGE", " help.R [--help | --version]", - " help.R [-f, --foo [ARG]] [-b, --bar [ARG]] ", + " help.R [-f, --foo [ARG]] [-b, --bar [ARG]]", "", "ARGUMENTS", - " --help : prints this and quietly exits ", - " --version : prints the version of {scribe} and quietly exits", - " -f, --foo [ARG] : ", - " -b, --bar [ARG] : ", + " --help prints this and quietly exits ", + " --version prints the version of {scribe} and quietly exits", + " -f, --foo [ARG] ", + " -b, --bar [ARG] ", NULL ) expect_identical(obj, exp)