1- test_that(" can build README in root directory" , {
1+ test_that(" can build README in root directory (Rmd) " , {
22 skip_on_cran()
33
44 pkg <- local_package_create()
@@ -9,7 +9,7 @@ test_that("can build README in root directory", {
99 expect_false(file_exists(path(pkg , " README.html" )))
1010})
1111
12- test_that(" can build README in inst/" , {
12+ test_that(" can build README in inst/ (Rmd) " , {
1313 skip_on_cran()
1414
1515 pkg <- local_package_create()
@@ -27,7 +27,7 @@ test_that("can build README in inst/", {
2727 expect_false(file_exists(path(pkg , " inst" , " README.html" )))
2828})
2929
30- test_that(" can build Quarto README in root directory" , {
30+ test_that(" can build README in root directory (qmd) " , {
3131 skip_on_cran()
3232
3333 pkg <- local_package_create()
@@ -38,7 +38,7 @@ test_that("can build Quarto README in root directory", {
3838 expect_false(file_exists(path(pkg , " README.html" )))
3939})
4040
41- test_that(" can build Quarto README in inst/" , {
41+ test_that(" can build README in inst/ (qmd) " , {
4242 skip_on_cran()
4343
4444 pkg <- local_package_create()
@@ -51,19 +51,28 @@ test_that("can build Quarto README in inst/", {
5151
5252 suppressMessages(build_readme(pkg ))
5353 expect_true(file_exists(path(pkg , " inst" , " README.md" )))
54- expect_false(file_exists(path(pkg , " README.Rmd " )))
54+ expect_false(file_exists(path(pkg , " README.qmd " )))
5555 expect_false(file_exists(path(pkg , " README.md" )))
5656 expect_false(file_exists(path(pkg , " inst" , " README.html" )))
5757})
5858
59- test_that(" useful errors if too few or too many" , {
59+ test_that(" useful errors if too few or too many (Rmd)" , {
60+ skip_on_cran()
61+
6062 pkg <- local_package_create()
6163 expect_snapshot(build_readme(pkg ), error = TRUE )
6264
6365 suppressMessages(usethis :: with_project(pkg , use_readme_rmd()))
6466 dir_create(pkg , " inst" )
6567 file_copy(path(pkg , " README.Rmd" ), path(pkg , " inst" , " README.Rmd" ))
6668 expect_snapshot(build_readme(pkg ), error = TRUE )
69+ })
70+
71+ test_that(" useful errors if too few or too many (qmd)" , {
72+ skip_on_cran()
73+
74+ pkg <- local_package_create()
75+ expect_snapshot(build_readme(pkg ), error = TRUE )
6776
6877 suppressMessages(usethis :: with_project(pkg , use_readme_qmd()))
6978 dir_create(pkg , " inst" )
@@ -72,12 +81,18 @@ test_that("useful errors if too few or too many", {
7281})
7382
7483test_that(" useful errors if too many--mixed Quarto and Rmd" , {
75- suppressMessages(usethis :: with_project(pkg , use_readme_rmd()))
76- suppressMessages(usethis :: with_project(pkg , use_readme_qmd()))
84+ skip_on_cran()
85+
86+ pkg <- local_package_create()
87+
88+ suppressMessages(usethis :: with_project(pkg , use_readme_rmd(open = FALSE )))
89+
90+ file_copy(path(pkg , " README.Rmd" ), path(pkg , " README.qmd" ))
91+
7792 expect_snapshot(build_readme(pkg ), error = TRUE )
7893})
7994
80- test_that(" don't error for README in another directory" , {
95+ test_that(" don't error for README in another directory (Rmd) " , {
8196 skip_on_cran()
8297
8398 pkg <- local_package_create()
@@ -88,7 +103,7 @@ test_that("don't error for README in another directory", {
88103 expect_no_error(suppressMessages(build_readme(pkg )))
89104})
90105
91- test_that(" don't error for Quarto README in another directory" , {
106+ test_that(" don't error for README in another directory (qmd) " , {
92107 skip_on_cran()
93108
94109 pkg <- local_package_create()
0 commit comments