@@ -49,31 +49,31 @@ test_that("parso external tests", {
49
49
test_that(" parso external char tests" , {
50
50
51
51
parso_files <- c(# "charset_aara",
52
- # "charset_acro",
53
- " charset_acyr" , " charset_agrk" ,
54
- # "charset_aheb",
55
- # "charset_aice",
56
- " charset_ansi" , " charset_arab" ,
57
- # "charset_arma",
58
- " charset_arom" ,
59
- # "charset_atha",
60
- " charset_atur" ,
61
- " charset_aukr" , " charset_big5" , " charset_cyrl" , " charset_gbke" ,
62
- " charset_grek" , " charset_hebr" , " charset_j932" , " charset_j942" ,
63
- " charset_jeuc" , " charset_jiso" , " charset_keuc" , " charset_kiso" ,
64
- " charset_kpce" , " charset_kwin" , " charset_lat1" , " charset_lat2" ,
65
- " charset_lat3" , " charset_lat4" , " charset_lat5" , " charset_lat7" ,
66
- " charset_lat9" , " charset_p852" , " charset_p857" , " charset_p858" ,
67
- " charset_p860" , " charset_p862" , " charset_p864" , " charset_p874" ,
68
- " charset_sjis" ,
69
- # "charset_sjs4",
70
- " charset_thai" , " charset_utf8" ,
71
- " charset_wara" , " charset_wbal" , " charset_wcyr" , " charset_wgrk" ,
72
- " charset_wheb" , " charset_wlt1" , " charset_wlt2" , " charset_wtur" ,
73
- " charset_wvie" , " charset_yeuc" , " charset_ywin" , " charset_zeuc" # ,
74
- # "charset_zpce",
75
- # "charset_zwin"
76
- )
52
+ # "charset_acro",
53
+ " charset_acyr" , " charset_agrk" ,
54
+ # "charset_aheb",
55
+ # "charset_aice",
56
+ " charset_ansi" , " charset_arab" ,
57
+ # "charset_arma",
58
+ " charset_arom" ,
59
+ # "charset_atha",
60
+ " charset_atur" ,
61
+ " charset_aukr" , " charset_big5" , " charset_cyrl" , " charset_gbke" ,
62
+ " charset_grek" , " charset_hebr" , " charset_j932" , " charset_j942" ,
63
+ " charset_jeuc" , " charset_jiso" , " charset_keuc" , " charset_kiso" ,
64
+ " charset_kpce" , " charset_kwin" , " charset_lat1" , " charset_lat2" ,
65
+ " charset_lat3" , " charset_lat4" , " charset_lat5" , " charset_lat7" ,
66
+ " charset_lat9" , " charset_p852" , " charset_p857" , " charset_p858" ,
67
+ " charset_p860" , " charset_p862" , " charset_p864" , " charset_p874" ,
68
+ " charset_sjis" ,
69
+ # "charset_sjs4",
70
+ " charset_thai" , " charset_utf8" ,
71
+ " charset_wara" , " charset_wbal" , " charset_wcyr" , " charset_wgrk" ,
72
+ " charset_wheb" , " charset_wlt1" , " charset_wlt2" , " charset_wtur" ,
73
+ " charset_wvie" , " charset_yeuc" , " charset_ywin" , " charset_zeuc" # ,
74
+ # "charset_zpce",
75
+ # "charset_zwin"
76
+ )
77
77
78
78
for (fl in parso_files ) {
79
79
@@ -88,3 +88,33 @@ test_that("parso external char tests", {
88
88
}
89
89
90
90
})
91
+
92
+ test_that(" test external sas7bdat" , {
93
+
94
+ sas7bdat_files <- c(
95
+ " charactervalues" ,
96
+ " datetimevalues" ,
97
+ " datevalues" ,
98
+ " floatvalues" ,
99
+ " intvalues" ,
100
+ " mixedvalues" ,
101
+ " mixedvalues_compressed_binary" ,
102
+ " mixedvalues_compressed_char" ,
103
+ " mixedvalues_compressed_yes" ,
104
+ " mixedvalues_empty" ,
105
+ " specialcharactervalues" ,
106
+ " timevalues"
107
+ )
108
+
109
+ for (fl in sas7bdat_files ) {
110
+
111
+ message(fl )
112
+ sas7bdat <- sprintf(" https://bitbucket.org/jaredhobbs/sas7bdat/raw/18cbd14407918c1aa90f136c1d6c5d83f307dba0/tests/data/%s.sas7bdat" , fl )
113
+
114
+ exp <- haven :: read_sas(sas7bdat )
115
+ got <- read.sas(sas7bdat , debug = FALSE )
116
+
117
+ expect_true(all.equal(got , exp , check.attributes = FALSE ))
118
+ }
119
+
120
+ })
0 commit comments