Skip to content

Conversation

kentfredric
Copy link
Contributor

Fixes: #38

Leaves all other tests in place.

Provides a #[doc(hidden)] shim for accessing/using otherwise private
members from tests/
- Unify all tests/ into a single file to reduce the number of output
  targets during `cargo test`
- This also avoids double-compiling the normalization_tests.rs
- Move normalization_tests.rs to be a child of tests/data/ to avoid
  getting compiled as a test unit, and further removing useless output
  from cargo test
Leaving integrated bundled tests working.
@kentfredric
Copy link
Contributor Author

You'd also need to update the script to generate the normalization tests file in the tests folder instead.

I haven't done this part yet, for 2 reasons:

  1. The existing code doesn't drop these files in the right place as it is, and it has to be done manually.
  2. The existing code generates a copy of the tables.rs file without some changes that were recently added manually: cc442c3#diff-c423bc3001a014e9b6c8d2d65fcd5da6
diff --git a/src/tables.rs b/src/tables.rs
index 960a94f..f92898d 100644
--- a/src/tables.rs
+++ b/src/tables.rs
@@ -19217,6 +19217,7 @@ pub(crate) const COMBINING_MARK_KV: &[u32] = &[
 
 
 #[inline]
+#[allow(ellipsis_inclusive_range_patterns)]
 pub fn qc_nfc(c: char) -> IsNormalized {
     match c {
         '\u{0340}'...'\u{0341}' => No,
@@ -19340,6 +19341,7 @@ pub fn qc_nfc(c: char) -> IsNormalized {
 }
 
 #[inline]
+#[allow(ellipsis_inclusive_range_patterns)]
 pub fn qc_nfkc(c: char) -> IsNormalized {
     match c {
         '\u{00A0}' => No,
@@ -19776,6 +19778,7 @@ pub fn qc_nfkc(c: char) -> IsNormalized {
 }
 
 #[inline]
+#[allow(ellipsis_inclusive_range_patterns)]
 pub fn qc_nfd(c: char) -> IsNormalized {
     match c {
         '\u{00C0}'...'\u{00C5}' => No,
@@ -20025,6 +20028,7 @@ pub fn qc_nfd(c: char) -> IsNormalized {
 }
 
 #[inline]
+#[allow(ellipsis_inclusive_range_patterns)]
 pub fn qc_nfkd(c: char) -> IsNormalized {
     match c {
         '\u{00A0}' => No,

@Manishearth Manishearth merged commit 717e6c2 into unicode-rs:master Nov 22, 2019
@Manishearth
Copy link
Member

Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

cargo test fails from crates.io tarball

2 participants