Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support Empty Globs for #[test_resources(...)] #12

Open
almann opened this issue Apr 26, 2021 · 0 comments
Open

Support Empty Globs for #[test_resources(...)] #12

almann opened this issue Apr 26, 2021 · 0 comments

Comments

@almann
Copy link

almann commented Apr 26, 2021

We have some test code in which a glob currently yields no results, but if the test vector suite ever adds a file with that pattern,
it would be nice to have it just work.

E.g. our tests do this to remind ourselves about this future case:

#[test_resources("ion-tests/iontestdata/good/non-equivs/**/*.ion")]
// no binary files exist and the macro doesn't like empty globs...
//#[test_resources("ion-tests/iontestdata/good/non-equivs/**/*.10n")]
fn non_equivs(file_name: &str) {

It would be nice to allow the empty glob to work, or at least have a parameter to allow it.

almann added a commit to amazon-ion/ion-rust that referenced this issue Apr 26, 2021
* Adds `test-generator` create dev dependency to get test per file.
* Adds a test suite with `good`/`bad` files with skip lists.
  - `equivs` and `non-equivs` are also supported with
    `embedded_document` parsing.
* Adds `Loader::load_all` convenience method.
* Adds doc test example in `loader` module docs and fixes the iterator
  example.

Additional notes:
* Added #216 as a result of non-equivs testing and it definitely exposes
  a weakness in our unit tests and bug in our `PartialEq` for `...Struct`.
* Added #218 to track a particular set ion-c integration issues around integer
  sizes and binary reader.
* Added #219 to track adding support for unknown text symbol tokens in `Loader`.
* Added #220 to track adding `IonEq`.
* Added amazon-ion/ion-c#235 as these tests run into problems with negative
  binary integer syntax (but not hex or decimal), indicating a potential
  issue there.
* Added frehberg/test-generator#12 to capture the empty glob issue.

Resolves #214.
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

No branches or pull requests

1 participant