Skip to content

Commit

Permalink
Merge pull request #31 from Merck/issue-20
Browse files Browse the repository at this point in the history
Expand file extension dictionary
  • Loading branch information
yilong zhang committed Mar 21, 2022
2 parents 7dbcd59 + e3885d5 commit 631d06f
Show file tree
Hide file tree
Showing 3 changed files with 116 additions and 40 deletions.
62 changes: 50 additions & 12 deletions R/dictionary.R
Original file line number Diff line number Diff line change
Expand Up @@ -36,19 +36,31 @@
#' ext_text()
ext_text <- function(flat = FALSE) {
x <- list(
"r" = c("R", "r", "s"),
"r" = c("R", "r", "s", "q"),
"man" = c("Rd", "rd"),
"manfigures" = c("svg"),
"src" = c(
"c", "h", "cpp", "hpp", "hxx", "hh",
"f", "f90", "f95", "f03"
"c", "h", "cpp", "cc", "hpp", "hxx", "hh",
"f", "f90", "f95", "f03",
"win", "in", "ucrt", "ac"
),
"vignette" = c("Rmd", "md", "Rnw", "tex", "bib"),
"meta" = c("Rproj", "dcf", "yml", "yaml"),
"vignette" = c(
"Rmd", "md", "csl", "Rnw", "tex", "ltx", "rsp", "cls", "sty",
"bib", "bst", "asis", "el"
),
"meta" = c("Rproj", "dcf", "yml", "yaml", "note"),
"table" = c("csv", "tsv", "txt"),
"figure" = c("svg"),
"web" = c("html", "css", "js", "xml"),
"doc" = c("rtf")
"web" = c("html", "htm", "shtml", "css", "js", "json", "xml", "scss", "less"),
"doc" = c("rtf"),
"log" = c("save", "Rout"),
"proglang" = c(
"stan", "bug", "jags", "py", "ipynb", "sh", "java", "bat", "m4", "cmake",
"sql", "lua", "rs", "jl", "pl", "pm"
),
"gettext" = c("po", "pot"),
"geo" = c("geojson", "kml", "prj", "cpg", "qpj"),
"bio" = c("fasta", "fastq", "vcf", "ped", "bim", "fam", "gff", "gtf")
)
if (flat) unique(unlist(x)) else x
}
Expand Down Expand Up @@ -76,12 +88,24 @@ ext_binary <- function(flat = FALSE) {
"data" = c("rda", "rds", "RData"),
"manfigures" = c("jpg", "jpeg", "pdf", "png"),
"figure" = c(
"png", "jpg", "jpeg", "bmp", "gif", "tiff", "emf",
"ico", "webp", "eps", "pdf"
"png", "jpg", "jpeg", "bmp", "gif", "tif", "tiff", "emf", "svgz",
"ico", "webp", "eps", "pdf",
"ppm", "pgm", "pbm", "pnm"
),
"src" = c("o", "so"),
"mso" = c("docx", "xlsx", "pptx", "doc", "xls", "ppt"),
"sas" = c("sas7bdat", "sas7bcat", "xpt", "xpt5", "xpt8")
"build" = c("rdb", "rdx"),
"web" = c("woff2", "woff", "otf", "ttf", "eot"),
"mso" = c("docx", "xlsx", "pptx", "xltx", "potx", "doc", "xls", "ppt"),
"odf" = c("odt", "ods", "odp", "odg", "odc", "odf", "odi", "odm", "odb"),
"sas" = c("sas7bdat", "sas7bcat", "xpt", "xpt5", "xpt8"),
"archive" = c("zip", "tar", "gz", "tgz", "bz2", "7z", "xz"),
"db" = c("sqlite", "sqlite3"),
"proglang" = c("pyc", "jar"),
"gettext" = c("mo"),
"geo" = c("shx", "shp", "laz", "sbx", "sbn", "nc", "gpkg"),
"bio" = c("bam", "bai"),
"audio" = c("wav", "mp3", "mid", "ogg", "au", "m4a"),
"video" = c("mp4", "avi", "mov", "mkv", "webm")
)
if (flat) unique(unlist(x)) else x
}
Expand Down Expand Up @@ -110,11 +134,22 @@ pattern_file_root_core <- function() {
"^DESCRIPTION$",
"^NAMESPACE$",
"^README$",
"^README\\.Rmd$",
"^README\\.md$",
"^NEWS$",
"^NEWS\\.md$",
"^LICENSE$",
"\\.Rbuildignore$"
"^LICENCE$",
"^LICENSE\\.note$",
"^LICENCE\\.note$",
"\\.Rbuildignore$",
"\\.Rinstignore$",
"^configure$",
"^configure\\.win$",
"^configure\\.ac$",
"^configure\\.in$",
"^cleanup$",
"^cleanup\\.win$"
)
}

Expand All @@ -127,6 +162,9 @@ pattern_file_root_all <- function() {
"^README$",
"^NEWS$",
"^LICENSE$",
"^LICENCE$",
"^configure$",
"^cleanup$",
"*[.]"
)
}
Expand Down
62 changes: 50 additions & 12 deletions tests/testthat/test-independent-test_dictionary.R
Original file line number Diff line number Diff line change
@@ -1,18 +1,30 @@
test_that("Test ext_text() generate the right string list", {
str_ls <- list(
"r" = c("R", "r", "s"),
"r" = c("R", "r", "s", "q"),
"man" = c("Rd", "rd"),
"manfigures" = c("svg"),
"src" = c(
"c", "h", "cpp", "hpp", "hxx", "hh",
"f", "f90", "f95", "f03"
"c", "h", "cpp", "cc", "hpp", "hxx", "hh",
"f", "f90", "f95", "f03",
"win", "in", "ucrt", "ac"
),
"vignette" = c("Rmd", "md", "Rnw", "tex", "bib"),
"meta" = c("Rproj", "dcf", "yml", "yaml"),
"vignette" = c(
"Rmd", "md", "csl", "Rnw", "tex", "ltx", "rsp", "cls", "sty",
"bib", "bst", "asis", "el"
),
"meta" = c("Rproj", "dcf", "yml", "yaml", "note"),
"table" = c("csv", "tsv", "txt"),
"figure" = c("svg"),
"web" = c("html", "css", "js", "xml"),
"doc" = c("rtf")
"web" = c("html", "htm", "shtml", "css", "js", "json", "xml", "scss", "less"),
"doc" = c("rtf"),
"log" = c("save", "Rout"),
"proglang" = c(
"stan", "bug", "jags", "py", "ipynb", "sh", "java", "bat", "m4", "cmake",
"sql", "lua", "rs", "jl", "pl", "pm"
),
"gettext" = c("po", "pot"),
"geo" = c("geojson", "kml", "prj", "cpg", "qpj"),
"bio" = c("fasta", "fastq", "vcf", "ped", "bim", "fam", "gff", "gtf")
)

ls_target <- str_ls
Expand All @@ -30,12 +42,24 @@ test_that("Test ext_binary() generate the right string list", {
"data" = c("rda", "rds", "RData"),
"manfigures" = c("jpg", "jpeg", "pdf", "png"),
"figure" = c(
"png", "jpg", "jpeg", "bmp", "gif", "tiff", "emf",
"ico", "webp", "eps", "pdf"
"png", "jpg", "jpeg", "bmp", "gif", "tif", "tiff", "emf", "svgz",
"ico", "webp", "eps", "pdf",
"ppm", "pgm", "pbm", "pnm"
),
"src" = c("o", "so"),
"mso" = c("docx", "xlsx", "pptx", "doc", "xls", "ppt"),
"sas" = c("sas7bdat", "sas7bcat", "xpt", "xpt5", "xpt8")
"build" = c("rdb", "rdx"),
"web" = c("woff2", "woff", "otf", "ttf", "eot"),
"mso" = c("docx", "xlsx", "pptx", "xltx", "potx", "doc", "xls", "ppt"),
"odf" = c("odt", "ods", "odp", "odg", "odc", "odf", "odi", "odm", "odb"),
"sas" = c("sas7bdat", "sas7bcat", "xpt", "xpt5", "xpt8"),
"archive" = c("zip", "tar", "gz", "tgz", "bz2", "7z", "xz"),
"db" = c("sqlite", "sqlite3"),
"proglang" = c("pyc", "jar"),
"gettext" = c("mo"),
"geo" = c("shx", "shp", "laz", "sbx", "sbn", "nc", "gpkg"),
"bio" = c("bam", "bai"),
"audio" = c("wav", "mp3", "mid", "ogg", "au", "m4a"),
"video" = c("mp4", "avi", "mov", "mkv", "webm")
)

ls_target <- str_ls
Expand All @@ -53,11 +77,22 @@ test_that("Test pattern_file_root_core() generate the right string list", {
"^DESCRIPTION$",
"^NAMESPACE$",
"^README$",
"^README\\.Rmd$",
"^README\\.md$",
"^NEWS$",
"^NEWS\\.md$",
"^LICENSE$",
"\\.Rbuildignore$"
"^LICENCE$",
"^LICENSE\\.note$",
"^LICENCE\\.note$",
"\\.Rbuildignore$",
"\\.Rinstignore$",
"^configure$",
"^configure\\.win$",
"^configure\\.ac$",
"^configure\\.in$",
"^cleanup$",
"^cleanup\\.win$"
)

ls_target <- str_ls
Expand All @@ -73,6 +108,9 @@ test_that("Test pattern_file_root_all() generate the right string list", {
"^README$",
"^NEWS$",
"^LICENSE$",
"^LICENCE$",
"^configure$",
"^cleanup$",
"*[.]"
)

Expand Down
32 changes: 16 additions & 16 deletions tests/testthat/test-independent-test_templates.R
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ testthat::test_that("file_root_core() creates the correct 'file_spec' object", {
is_root_core <- is_file_spec_type(
fs_source = file_root_core(),
path = "",
pattern = "^DESCRIPTION$|^NAMESPACE$|^README$|^README\\.md$|^NEWS$|^NEWS\\.md$|^LICENSE$|\\.Rbuildignore$",
pattern = "^DESCRIPTION$|^NAMESPACE$|^README$|^README\\.Rmd$|^README\\.md$|^NEWS$|^NEWS\\.md$|^LICENSE$|^LICENCE$|^LICENSE\\.note$|^LICENCE\\.note$|\\.Rbuildignore$|\\.Rinstignore$|^configure$|^configure\\.win$|^configure\\.ac$|^configure\\.in$|^cleanup$|^cleanup\\.win$",
format = "text",
recursive = FALSE,
ignore_case = FALSE,
Expand All @@ -78,7 +78,7 @@ testthat::test_that("file_root_all() creates the correct 'file_spec' object", {
is_root_all <- is_file_spec_type(
fs_source = file_root_all(),
path = "",
pattern = "^DESCRIPTION$|^NAMESPACE$|^README$|^NEWS$|^LICENSE$|*[.]",
pattern = "^DESCRIPTION$|^NAMESPACE$|^README$|^NEWS$|^LICENSE$|^LICENCE$|^configure$|^cleanup$|*[.]",
format = "text",
recursive = FALSE,
ignore_case = TRUE,
Expand All @@ -102,7 +102,7 @@ testthat::test_that("file_r() creates the correct 'file_spec' objects", {
if (!is_spec_code & is_file_spec_type(
fs_source = fs,
path = "R/",
pattern = "\\.R$|\\.r$|\\.s$",
pattern = "\\.R$|\\.r$|\\.s$|\\.q$",
format = "text",
recursive = FALSE,
ignore_case = TRUE,
Expand Down Expand Up @@ -195,7 +195,7 @@ testthat::test_that("file_src() creates the correct 'file_spec' object", {
is_src <- is_file_spec_type(
fs_source = file_src(),
path = "src/",
pattern = "\\.c$|\\.h$|\\.cpp$|\\.hpp$|\\.hxx$|\\.hh$|\\.f$|\\.f90$|\\.f95$|\\.f03$",
pattern = "\\.c$|\\.h$|\\.cpp$|\\.cc$|\\.hpp$|\\.hxx$|\\.hh$|\\.f$|\\.f90$|\\.f95$|\\.f03$|\\.win$|\\.in$|\\.ucrt$|\\.ac$",
format = "text",
recursive = TRUE,
ignore_case = TRUE,
Expand Down Expand Up @@ -234,7 +234,7 @@ testthat::test_that("file_vignettes() creates the correct 'file_spec' objects",
if (!is_spec_text & is_file_spec_type(
fs_source = fs,
path = "vignettes/",
pattern = "\\.R$|\\.r$|\\.s$|\\.Rd$|\\.rd$|\\.svg$|\\.c$|\\.h$|\\.cpp$|\\.hpp$|\\.hxx$|\\.hh$|\\.f$|\\.f90$|\\.f95$|\\.f03$|\\.Rmd$|\\.md$|\\.Rnw$|\\.tex$|\\.bib$|\\.Rproj$|\\.dcf$|\\.yml$|\\.yaml$|\\.csv$|\\.tsv$|\\.txt$|\\.html$|\\.css$|\\.js$|\\.xml$|\\.rtf$",
pattern = "\\.R$|\\.r$|\\.s$|\\.q$|\\.Rd$|\\.rd$|\\.svg$|\\.c$|\\.h$|\\.cpp$|\\.cc$|\\.hpp$|\\.hxx$|\\.hh$|\\.f$|\\.f90$|\\.f95$|\\.f03$|\\.win$|\\.in$|\\.ucrt$|\\.ac$|\\.Rmd$|\\.md$|\\.csl$|\\.Rnw$|\\.tex$|\\.ltx$|\\.rsp$|\\.cls$|\\.sty$|\\.bib$|\\.bst$|\\.asis$|\\.el$|\\.Rproj$|\\.dcf$|\\.yml$|\\.yaml$|\\.note$|\\.csv$|\\.tsv$|\\.txt$|\\.html$|\\.htm$|\\.shtml$|\\.css$|\\.js$|\\.json$|\\.xml$|\\.scss$|\\.less$|\\.rtf$|\\.save$|\\.Rout$|\\.stan$|\\.bug$|\\.jags$|\\.py$|\\.ipynb$|\\.sh$|\\.java$|\\.bat$|\\.m4$|\\.cmake$|\\.sql$|\\.lua$|\\.rs$|\\.jl$|\\.pl$|\\.pm$|\\.po$|\\.pot$|\\.geojson$|\\.kml$|\\.prj$|\\.cpg$|\\.qpj$|\\.fasta$|\\.fastq$|\\.vcf$|\\.ped$|\\.bim$|\\.fam$|\\.gff$|\\.gtf$",
format = "text",
recursive = TRUE,
ignore_case = TRUE,
Expand All @@ -247,7 +247,7 @@ testthat::test_that("file_vignettes() creates the correct 'file_spec' objects",
(!is_spec_binary & is_file_spec_type(
fs_source = fs,
path = "vignettes/",
pattern = "\\.rda$|\\.rds$|\\.RData$|\\.jpg$|\\.jpeg$|\\.pdf$|\\.png$|\\.bmp$|\\.gif$|\\.tiff$|\\.emf$|\\.ico$|\\.webp$|\\.eps$|\\.o$|\\.so$|\\.docx$|\\.xlsx$|\\.pptx$|\\.doc$|\\.xls$|\\.ppt$|\\.sas7bdat$|\\.sas7bcat$|\\.xpt$|\\.xpt5$|\\.xpt8$",
pattern = "\\.rda$|\\.rds$|\\.RData$|\\.jpg$|\\.jpeg$|\\.pdf$|\\.png$|\\.bmp$|\\.gif$|\\.tif$|\\.tiff$|\\.emf$|\\.svgz$|\\.ico$|\\.webp$|\\.eps$|\\.ppm$|\\.pgm$|\\.pbm$|\\.pnm$|\\.o$|\\.so$|\\.rdb$|\\.rdx$|\\.woff2$|\\.woff$|\\.otf$|\\.ttf$|\\.eot$|\\.docx$|\\.xlsx$|\\.pptx$|\\.xltx$|\\.potx$|\\.doc$|\\.xls$|\\.ppt$|\\.odt$|\\.ods$|\\.odp$|\\.odg$|\\.odc$|\\.odf$|\\.odi$|\\.odm$|\\.odb$|\\.sas7bdat$|\\.sas7bcat$|\\.xpt$|\\.xpt5$|\\.xpt8$|\\.zip$|\\.tar$|\\.gz$|\\.tgz$|\\.bz2$|\\.7z$|\\.xz$|\\.sqlite$|\\.sqlite3$|\\.pyc$|\\.jar$|\\.mo$|\\.shx$|\\.shp$|\\.laz$|\\.sbx$|\\.sbn$|\\.nc$|\\.gpkg$|\\.bam$|\\.bai$|\\.wav$|\\.mp3$|\\.mid$|\\.ogg$|\\.au$|\\.m4a$|\\.mp4$|\\.avi$|\\.mov$|\\.mkv$|\\.webm$",
format = "binary",
recursive = TRUE,
ignore_case = TRUE,
Expand Down Expand Up @@ -287,7 +287,7 @@ testthat::test_that("file_default() creates the correct 'file_spec' objects", {
if (!is_root_core & is_file_spec_type(
fs_source = fs,
path = "",
pattern = "^DESCRIPTION$|^NAMESPACE$|^README$|^README\\.md$|^NEWS$|^NEWS\\.md$|^LICENSE$|\\.Rbuildignore$",
pattern = "^DESCRIPTION$|^NAMESPACE$|^README$|^README\\.Rmd$|^README\\.md$|^NEWS$|^NEWS\\.md$|^LICENSE$|^LICENCE$|^LICENSE\\.note$|^LICENCE\\.note$|\\.Rbuildignore$|\\.Rinstignore$|^configure$|^configure\\.win$|^configure\\.ac$|^configure\\.in$|^cleanup$|^cleanup\\.win$",
format = "text",
recursive = FALSE,
ignore_case = FALSE,
Expand All @@ -299,7 +299,7 @@ testthat::test_that("file_default() creates the correct 'file_spec' objects", {
else if (!is_spec_code & is_file_spec_type(
fs_source = fs,
path = "R/",
pattern = "\\.R$|\\.r$|\\.s$",
pattern = "\\.R$|\\.r$|\\.s$|\\.q$",
format = "text",
recursive = FALSE,
ignore_case = TRUE,
Expand Down Expand Up @@ -363,7 +363,7 @@ testthat::test_that("file_default() creates the correct 'file_spec' objects", {
(!is_src & is_file_spec_type(
fs_source = fs,
path = "src/",
pattern = "\\.c$|\\.h$|\\.cpp$|\\.hpp$|\\.hxx$|\\.hh$|\\.f$|\\.f90$|\\.f95$|\\.f03$",
pattern = "\\.c$|\\.h$|\\.cpp$|\\.cc$|\\.hpp$|\\.hxx$|\\.hh$|\\.f$|\\.f90$|\\.f95$|\\.f03$|\\.win$|\\.in$|\\.ucrt$|\\.ac$",
format = "text",
recursive = TRUE,
ignore_case = TRUE,
Expand All @@ -376,7 +376,7 @@ testthat::test_that("file_default() creates the correct 'file_spec' objects", {
else if (!is_spec_text & is_file_spec_type(
fs_source = fs,
path = "vignettes/",
pattern = "\\.R$|\\.r$|\\.s$|\\.Rd$|\\.rd$|\\.svg$|\\.c$|\\.h$|\\.cpp$|\\.hpp$|\\.hxx$|\\.hh$|\\.f$|\\.f90$|\\.f95$|\\.f03$|\\.Rmd$|\\.md$|\\.Rnw$|\\.tex$|\\.bib$|\\.Rproj$|\\.dcf$|\\.yml$|\\.yaml$|\\.csv$|\\.tsv$|\\.txt$|\\.html$|\\.css$|\\.js$|\\.xml$|\\.rtf$",
pattern = "\\.R$|\\.r$|\\.s$|\\.q$|\\.Rd$|\\.rd$|\\.svg$|\\.c$|\\.h$|\\.cpp$|\\.cc$|\\.hpp$|\\.hxx$|\\.hh$|\\.f$|\\.f90$|\\.f95$|\\.f03$|\\.win$|\\.in$|\\.ucrt$|\\.ac$|\\.Rmd$|\\.md$|\\.csl$|\\.Rnw$|\\.tex$|\\.ltx$|\\.rsp$|\\.cls$|\\.sty$|\\.bib$|\\.bst$|\\.asis$|\\.el$|\\.Rproj$|\\.dcf$|\\.yml$|\\.yaml$|\\.note$|\\.csv$|\\.tsv$|\\.txt$|\\.html$|\\.htm$|\\.shtml$|\\.css$|\\.js$|\\.json$|\\.xml$|\\.scss$|\\.less$|\\.rtf$|\\.save$|\\.Rout$|\\.stan$|\\.bug$|\\.jags$|\\.py$|\\.ipynb$|\\.sh$|\\.java$|\\.bat$|\\.m4$|\\.cmake$|\\.sql$|\\.lua$|\\.rs$|\\.jl$|\\.pl$|\\.pm$|\\.po$|\\.pot$|\\.geojson$|\\.kml$|\\.prj$|\\.cpg$|\\.qpj$|\\.fasta$|\\.fastq$|\\.vcf$|\\.ped$|\\.bim$|\\.fam$|\\.gff$|\\.gtf$",
format = "text",
recursive = TRUE,
ignore_case = TRUE,
Expand All @@ -389,7 +389,7 @@ testthat::test_that("file_default() creates the correct 'file_spec' objects", {
(!is_spec_binary & is_file_spec_type(
fs_source = fs,
path = "vignettes/",
pattern = "\\.rda$|\\.rds$|\\.RData$|\\.jpg$|\\.jpeg$|\\.pdf$|\\.png$|\\.bmp$|\\.gif$|\\.tiff$|\\.emf$|\\.ico$|\\.webp$|\\.eps$|\\.o$|\\.so$|\\.docx$|\\.xlsx$|\\.pptx$|\\.doc$|\\.xls$|\\.ppt$|\\.sas7bdat$|\\.sas7bcat$|\\.xpt$|\\.xpt5$|\\.xpt8$",
pattern = "\\.rda$|\\.rds$|\\.RData$|\\.jpg$|\\.jpeg$|\\.pdf$|\\.png$|\\.bmp$|\\.gif$|\\.tif$|\\.tiff$|\\.emf$|\\.svgz$|\\.ico$|\\.webp$|\\.eps$|\\.ppm$|\\.pgm$|\\.pbm$|\\.pnm$|\\.o$|\\.so$|\\.rdb$|\\.rdx$|\\.woff2$|\\.woff$|\\.otf$|\\.ttf$|\\.eot$|\\.docx$|\\.xlsx$|\\.pptx$|\\.xltx$|\\.potx$|\\.doc$|\\.xls$|\\.ppt$|\\.odt$|\\.ods$|\\.odp$|\\.odg$|\\.odc$|\\.odf$|\\.odi$|\\.odm$|\\.odb$|\\.sas7bdat$|\\.sas7bcat$|\\.xpt$|\\.xpt5$|\\.xpt8$|\\.zip$|\\.tar$|\\.gz$|\\.tgz$|\\.bz2$|\\.7z$|\\.xz$|\\.sqlite$|\\.sqlite3$|\\.pyc$|\\.jar$|\\.mo$|\\.shx$|\\.shp$|\\.laz$|\\.sbx$|\\.sbn$|\\.nc$|\\.gpkg$|\\.bam$|\\.bai$|\\.wav$|\\.mp3$|\\.mid$|\\.ogg$|\\.au$|\\.m4a$|\\.mp4$|\\.avi$|\\.mov$|\\.mkv$|\\.webm$",
format = "binary",
recursive = TRUE,
ignore_case = TRUE,
Expand Down Expand Up @@ -449,7 +449,7 @@ testthat::test_that("file_ectd() creates the correct 'file_spec' objects", {
if (!is_root_core & is_file_spec_type(
fs_source = fs,
path = "",
pattern = "^DESCRIPTION$|^NAMESPACE$|^README$|^README\\.md$|^NEWS$|^NEWS\\.md$|^LICENSE$|\\.Rbuildignore$",
pattern = "^DESCRIPTION$|^NAMESPACE$|^README$|^README\\.Rmd$|^README\\.md$|^NEWS$|^NEWS\\.md$|^LICENSE$|^LICENCE$|^LICENSE\\.note$|^LICENCE\\.note$|\\.Rbuildignore$|\\.Rinstignore$|^configure$|^configure\\.win$|^configure\\.ac$|^configure\\.in$|^cleanup$|^cleanup\\.win$",
format = "text",
recursive = FALSE,
ignore_case = FALSE,
Expand All @@ -461,7 +461,7 @@ testthat::test_that("file_ectd() creates the correct 'file_spec' objects", {
else if (!is_spec_code & is_file_spec_type(
fs_source = fs,
path = "R/",
pattern = "\\.R$|\\.r$|\\.s$",
pattern = "\\.R$|\\.r$|\\.s$|\\.q$",
format = "text",
recursive = FALSE,
ignore_case = TRUE,
Expand Down Expand Up @@ -525,7 +525,7 @@ testthat::test_that("file_ectd() creates the correct 'file_spec' objects", {
(!is_src & is_file_spec_type(
fs_source = fs,
path = "src/",
pattern = "\\.c$|\\.h$|\\.cpp$|\\.hpp$|\\.hxx$|\\.hh$|\\.f$|\\.f90$|\\.f95$|\\.f03$",
pattern = "\\.c$|\\.h$|\\.cpp$|\\.cc$|\\.hpp$|\\.hxx$|\\.hh$|\\.f$|\\.f90$|\\.f95$|\\.f03$|\\.win$|\\.in$|\\.ucrt$|\\.ac$",
format = "text",
recursive = TRUE,
ignore_case = TRUE,
Expand Down Expand Up @@ -573,7 +573,7 @@ testthat::test_that("file_auto() creates the correct 'file_spec' objects", {
if (!is_spec_text & is_file_spec_type(
fs_source = fs,
path = "inst/",
pattern = "\\.R$|\\.r$|\\.s$|\\.Rd$|\\.rd$|\\.svg$|\\.c$|\\.h$|\\.cpp$|\\.hpp$|\\.hxx$|\\.hh$|\\.f$|\\.f90$|\\.f95$|\\.f03$|\\.Rmd$|\\.md$|\\.Rnw$|\\.tex$|\\.bib$|\\.Rproj$|\\.dcf$|\\.yml$|\\.yaml$|\\.csv$|\\.tsv$|\\.txt$|\\.html$|\\.css$|\\.js$|\\.xml$|\\.rtf$",
pattern = "\\.R$|\\.r$|\\.s$|\\.q$|\\.Rd$|\\.rd$|\\.svg$|\\.c$|\\.h$|\\.cpp$|\\.cc$|\\.hpp$|\\.hxx$|\\.hh$|\\.f$|\\.f90$|\\.f95$|\\.f03$|\\.win$|\\.in$|\\.ucrt$|\\.ac$|\\.Rmd$|\\.md$|\\.csl$|\\.Rnw$|\\.tex$|\\.ltx$|\\.rsp$|\\.cls$|\\.sty$|\\.bib$|\\.bst$|\\.asis$|\\.el$|\\.Rproj$|\\.dcf$|\\.yml$|\\.yaml$|\\.note$|\\.csv$|\\.tsv$|\\.txt$|\\.html$|\\.htm$|\\.shtml$|\\.css$|\\.js$|\\.json$|\\.xml$|\\.scss$|\\.less$|\\.rtf$|\\.save$|\\.Rout$|\\.stan$|\\.bug$|\\.jags$|\\.py$|\\.ipynb$|\\.sh$|\\.java$|\\.bat$|\\.m4$|\\.cmake$|\\.sql$|\\.lua$|\\.rs$|\\.jl$|\\.pl$|\\.pm$|\\.po$|\\.pot$|\\.geojson$|\\.kml$|\\.prj$|\\.cpg$|\\.qpj$|\\.fasta$|\\.fastq$|\\.vcf$|\\.ped$|\\.bim$|\\.fam$|\\.gff$|\\.gtf$",
format = "text",
recursive = TRUE,
ignore_case = TRUE,
Expand All @@ -586,7 +586,7 @@ testthat::test_that("file_auto() creates the correct 'file_spec' objects", {
(!is_spec_binary & is_file_spec_type(
fs_source = fs,
path = "inst/",
pattern = "\\.rda$|\\.rds$|\\.RData$|\\.jpg$|\\.jpeg$|\\.pdf$|\\.png$|\\.bmp$|\\.gif$|\\.tiff$|\\.emf$|\\.ico$|\\.webp$|\\.eps$|\\.o$|\\.so$|\\.docx$|\\.xlsx$|\\.pptx$|\\.doc$|\\.xls$|\\.ppt$|\\.sas7bdat$|\\.sas7bcat$|\\.xpt$|\\.xpt5$|\\.xpt8$",
pattern = "\\.rda$|\\.rds$|\\.RData$|\\.jpg$|\\.jpeg$|\\.pdf$|\\.png$|\\.bmp$|\\.gif$|\\.tif$|\\.tiff$|\\.emf$|\\.svgz$|\\.ico$|\\.webp$|\\.eps$|\\.ppm$|\\.pgm$|\\.pbm$|\\.pnm$|\\.o$|\\.so$|\\.rdb$|\\.rdx$|\\.woff2$|\\.woff$|\\.otf$|\\.ttf$|\\.eot$|\\.docx$|\\.xlsx$|\\.pptx$|\\.xltx$|\\.potx$|\\.doc$|\\.xls$|\\.ppt$|\\.odt$|\\.ods$|\\.odp$|\\.odg$|\\.odc$|\\.odf$|\\.odi$|\\.odm$|\\.odb$|\\.sas7bdat$|\\.sas7bcat$|\\.xpt$|\\.xpt5$|\\.xpt8$|\\.zip$|\\.tar$|\\.gz$|\\.tgz$|\\.bz2$|\\.7z$|\\.xz$|\\.sqlite$|\\.sqlite3$|\\.pyc$|\\.jar$|\\.mo$|\\.shx$|\\.shp$|\\.laz$|\\.sbx$|\\.sbn$|\\.nc$|\\.gpkg$|\\.bam$|\\.bai$|\\.wav$|\\.mp3$|\\.mid$|\\.ogg$|\\.au$|\\.m4a$|\\.mp4$|\\.avi$|\\.mov$|\\.mkv$|\\.webm$",
format = "binary",
recursive = TRUE,
ignore_case = TRUE,
Expand Down

0 comments on commit 631d06f

Please sign in to comment.