-
Notifications
You must be signed in to change notification settings - Fork 56
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #113 from kornelski/untest
Exclude test data files from crates.io package
- Loading branch information
Showing
40 changed files
with
169 additions
and
162 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -5,6 +5,7 @@ version = "0.8.35" | |
edition = '2018' | ||
authors = ["Henri Sivonen <[email protected]>"] | ||
license = "(Apache-2.0 OR MIT) AND BSD-3-Clause" | ||
include = ["src/**/*.rs", "/data", "Cargo.toml", "COPYRIGHT", "LICENSE*", "README.md"] | ||
readme = "README.md" | ||
documentation = "https://docs.rs/encoding_rs/" | ||
homepage = "https://docs.rs/encoding_rs/" | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
use encoding_rs::*; | ||
|
||
#[test] | ||
#[cfg_attr(miri, ignore)] // Miri is too slow | ||
fn test_big5_decode_all() { | ||
let input = include_bytes!("test_data/big5_in.txt"); | ||
let expectation = include_str!("test_data/big5_in_ref.txt"); | ||
let (cow, had_errors) = BIG5.decode_without_bom_handling(input); | ||
assert!(had_errors, "Should have had errors."); | ||
assert_eq!(&cow[..], expectation); | ||
} | ||
|
||
#[test] | ||
#[cfg_attr(miri, ignore)] // Miri is too slow | ||
fn test_big5_encode_all() { | ||
let input = include_str!("test_data/big5_out.txt"); | ||
let expectation = include_bytes!("test_data/big5_out_ref.txt"); | ||
let (cow, encoding, had_errors) = BIG5.encode(input); | ||
assert!(!had_errors, "Should not have had errors."); | ||
assert_eq!(encoding, BIG5); | ||
assert_eq!(&cow[..], &expectation[..]); | ||
} |
Oops, something went wrong.