Skip to content

Commit

Permalink
move command-line tests to test-basic.R so that we can avoid publishi…
Browse files Browse the repository at this point in the history
…ng TinyTeX when these commands fail, e.g., yihui/yihui.org#1089 (comment)
  • Loading branch information
yihui committed Oct 9, 2023
1 parent c367e82 commit 8c3f7e4
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 8 deletions.
9 changes: 9 additions & 0 deletions tools/test-basic.R
Original file line number Diff line number Diff line change
@@ -1,3 +1,12 @@
cmds = c(
"tlmgr info --list --data relocatable" = tinytex:::tl_list('framed', 'relocatable'),
"tlmgr search --file --global '/framed.sty'" = tinytex::tlmgr_search('/framed.sty')
)
if (any(i <- cmds != 0)) stop(
'The command(s) ', paste0('`', names(cmds)[i], '`', collapse = ', '),
' failed. It might be a bug of TeX Live.'
)

for (i in c('tlmgr', 'pdflatex', 'xelatex', 'pandoc')) {
cat('\nThe version of', i, '\n\n')
system2(i, '--version')
Expand Down
8 changes: 0 additions & 8 deletions tools/test-packages.R
Original file line number Diff line number Diff line change
Expand Up @@ -62,11 +62,3 @@ if (!identical(p1 <- tinytex:::tl_platforms(), p2 <- tinytex:::.tl_platforms)) s
'\n.tl_platforms returned ', paste(p2, collapse = ', '),
'\nThe latter needs to be updated in the tinytex package.'
)

if (tinytex:::tl_list('framed', 'relocatable') != 0) {
stop('The command `tlmgr info --list --data relocatable` failed. It might be a bug of TeX Live.')
}

if (tinytex::tlmgr_search('/framed.sty') != 0) {
stop('The command `tlmgr search` failed. It might be a bug of TeX Live.')
}

0 comments on commit 8c3f7e4

Please sign in to comment.