Skip to content

Commit

Permalink
[tests] extend parso tests
Browse files Browse the repository at this point in the history
  • Loading branch information
JanMarvin committed Apr 25, 2024
1 parent a644c91 commit 19ab013
Showing 1 changed file with 43 additions and 0 deletions.
43 changes: 43 additions & 0 deletions tests/testthat/test_parso.R
Original file line number Diff line number Diff line change
Expand Up @@ -45,3 +45,46 @@ test_that("parso external tests", {
}

})

test_that("parso external char tests", {

parso_files <- c(#"charset_aara",
#"charset_acro",

Check warning on line 52 in tests/testthat/test_parso.R

View workflow job for this annotation

GitHub Actions / lint

file=tests/testthat/test_parso.R,line=52,col=19,[indentation_linter] Indentation should be 4 spaces but is 19 spaces.
"charset_acyr", "charset_agrk",
# "charset_aheb",
# "charset_aice",
"charset_ansi", "charset_arab",
# "charset_arma",
"charset_arom",
# "charset_atha",
"charset_atur",
"charset_aukr", "charset_big5", "charset_cyrl", "charset_gbke",
"charset_grek", "charset_hebr", "charset_j932", "charset_j942",
"charset_jeuc", "charset_jiso", "charset_keuc", "charset_kiso",
"charset_kpce", "charset_kwin", "charset_lat1", "charset_lat2",
"charset_lat3", "charset_lat4", "charset_lat5", "charset_lat7",
"charset_lat9", "charset_p852", "charset_p857", "charset_p858",
"charset_p860", "charset_p862", "charset_p864", "charset_p874",
"charset_sjis",
# "charset_sjs4",
"charset_thai", "charset_utf8",
"charset_wara", "charset_wbal", "charset_wcyr", "charset_wgrk",
"charset_wheb", "charset_wlt1", "charset_wlt2", "charset_wtur",
"charset_wvie", "charset_yeuc", "charset_ywin", "charset_zeuc"#,
# "charset_zpce",
# "charset_zwin"
)

Check warning on line 76 in tests/testthat/test_parso.R

View workflow job for this annotation

GitHub Actions / lint

file=tests/testthat/test_parso.R,line=76,col=19,[indentation_linter] Indentation should be 2 spaces but is 19 spaces.

for (fl in parso_files) {

message(fl)
sas7bdat <- sprintf("https://github.com/epam/parso/raw/master/src/test/resources/sas7bdat/%s.sas7bdat", fl)
csv <- sprintf("https://github.com/epam/parso/raw/master/src/test/resources/csv/%s.csv", fl)

got <- read.sas(sas7bdat, debug = FALSE)
exp <- read.csv(csv, na.strings = "NA")

expect_true(all.equal(got, exp, check.attributes = FALSE))
}

})

0 comments on commit 19ab013

Please sign in to comment.