Skip to content

Conversation

@kentfredric
Copy link
Contributor

Hopefully this provides the best of all worlds.

Importantly, this re-introduces src/test.rs, as that's something that
can't be trivially generated.

Both approaches are documented so the path to the easiest working
solution is clear for vendors, and they can pick either the more
expensive solution, or the simpler (but less comprehensive) one.

If this PR meets general approval, I'd like to add a .travis.yml
step that automatically tests the --cfg minimal_tests path, so at
least, that will be a "stable" target, as testing that the deployed
crate is free from errors is presently too much work to expect the
average maintainer or contributor to remember to do.

Closes: #38

Hopefully this provides the best of all worlds.

Importantly, this re-introduces src/test.rs, as that's something that
can't be trivially generated.

Both approaches are documented so the path to the easiest working
solution is clear for vendors, and they can pick either the more
expensive solution, or the simpler (but less comprehensive) one.

If this PR meets general approval, I'd like to add a .travis.yml
step that automatically tests the --cfg minimal_tests path, so at
least, that will be a "stable" target, as testing that the deployed
crate is free from errors is presently too much work to expect the
average maintainer or contributor to remember to do.

Closes: unicode-rs#38
@Manishearth
Copy link
Member

I think this approach is okay. Adding the travis entry also sounds good.

An alternate approach that might be better for you would be to move stuff into tests/ so that you don't need to use cfg(), and then reexport the tables via a doc(hidden) public module that the tests use. You'd also need to update the script to generate the normalization tests file in the tests folder instead.

Up to you, both approaches seem fine to me, but the latter means that you don't need special instructions for running the tests.

This is still just a work-in-progress, so may be rebased-out in future,
just seeing if it Works yet before I spend time on something potentially
more finely grained.
@kentfredric
Copy link
Contributor Author

Self closing as is subsumed by #48

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