File tree Expand file tree Collapse file tree 1 file changed +26
-0
lines changed Expand file tree Collapse file tree 1 file changed +26
-0
lines changed Original file line number Diff line number Diff line change @@ -243,6 +243,32 @@ run_test(
243243 }
244244)
245245
246+ # failure with --no-update does not create WORDLIST
247+ run_test(
248+ " spell-check" ,
249+ suffix = " -fail.md" ,
250+ std_err = " Spell check failed" ,
251+ cmd_args = " --no-update" ,
252+ post_hook_assert = function (tempdir ) {
253+ wordlist_path <- fs :: path(tempdir , " inst" , " WORDLIST" )
254+ testthat :: expect_false(fs :: file_exists(wordlist_path ))
255+ }
256+ )
257+
258+ # failure with --no-update does not update WORDLIST
259+ run_test(
260+ " spell-check" ,
261+ suffix = " -fail-2" ,
262+ std_err = " Spell check failed" ,
263+ cmd_args = " --no-update" ,
264+ artifacts = c(" inst/WORDLIST" = test_path(" in/WORDLIST" )),
265+ post_hook_assert = function (tempdir ) {
266+ words_before <- readLines(test_path(" in/WORDLIST" ))
267+ words_after <- readLines(fs :: path(tempdir , " inst" , " WORDLIST" ))
268+ testthat :: expect_equal(words_after , words_before )
269+ }
270+ )
271+
246272# success with wordlist
247273run_test(" spell-check" ,
248274 suffix = " -wordlist-success.md" ,
You can’t perform that action at this time.
0 commit comments