Skip to content

Commit

Permalink
clean up tests
Browse files Browse the repository at this point in the history
  • Loading branch information
jmbarbone committed Dec 18, 2023
1 parent 12385a2 commit b4db8db
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 14 deletions.
2 changes: 1 addition & 1 deletion R/command-args.R
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
16 changes: 8 additions & 8 deletions tests/testthat/_snaps/class-command-args.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
USAGE
{command} [--help | --version]
{command}
{command}
ARGUMENTS
--help prints this and quietly exits
Expand All @@ -34,7 +34,7 @@
USAGE
{command} [--help | --version]
{command}
{command}
ARGUMENTS
--help prints this and quietly exits
Expand All @@ -54,7 +54,7 @@
USAGE
{command} [--help | --version]
{command}
{command}
ARGUMENTS
--help prints this and quietly exits
Expand All @@ -74,7 +74,7 @@
USAGE
{command} [--help | --version]
{command}
{command}
ARGUMENTS
--help prints this and quietly exits
Expand All @@ -91,7 +91,7 @@
USAGE
{command} [--help | --version]
{command}
{command}
ARGUMENTS
--help prints this and quietly exits
Expand All @@ -112,7 +112,7 @@
USAGE
{command} [--help | --version]
{command}
{command}
ARGUMENTS
--help prints this and quietly exits
Expand All @@ -129,7 +129,7 @@
USAGE
{command} [--help | --version]
{command}
{command}
ARGUMENTS
--help prints this and quietly exits
Expand Down Expand Up @@ -162,7 +162,7 @@
USAGE
{command} [--help | --version]
{command}
{command}
ARGUMENTS
--help prints this and quietly exits
Expand Down
10 changes: 5 additions & 5 deletions tests/testthat/test-scripts.R
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit b4db8db

Please sign in to comment.