Keyboard shortcuts

Press or to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

Testing

To perform unit / integration tests, run the following.

cargo test --workspace

To run only integration tests:

cargo test -p readstat-tests

Datasets

Formally tested (via integration tests) against the following datasets. See the README.md for data sources.

  • ahs2019n.sas7bdat → US Census data (download via download_ahs.sh or download_ahs.ps1)
  • all_dates.sas7bdat → SAS dataset containing all possible date formats
  • all_datetimes.sas7bdat → SAS dataset containing all possible datetime formats
  • all_times.sas7bdat → SAS dataset containing all possible time formats
  • all_types.sas7bdat → SAS dataset containing all SAS types
  • cars.sas7bdat → SAS cars dataset
  • hasmissing.sas7bdat → SAS dataset containing missing values
  • intel.sas7bdat
  • malformed_utf8.sas7bdat → SAS dataset with truncated multi-byte UTF-8 characters (issue #78)
  • messydata.sas7bdat
  • rand_ds_largepage_err.sas7bdat → Created using create_rand_ds.sas with BUFSIZE set to 2M
  • rand_ds_largepage_ok.sas7bdat → Created using create_rand_ds.sas with BUFSIZE set to 1M
  • scientific_notation.sas7bdat → Used to test float parsing
  • somedata.sas7bdat → Used to test Parquet label preservation
  • somemiss.sas7bdat

Valgrind

To ensure no memory leaks, valgrind may be utilized. For example, to ensure no memory leaks for the test parse_file_metadata_test, run the following from within the readstat directory.

valgrind ./target/debug/deps/parse_file_metadata_test-<hash>