cargo test fails on archive from crates.io

Open
#213 9 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
3/5
Estimated time
1-2 days
Newbie friendliness
45/100
Issue type
Bug
Clarity
Mostly clear
Activity status
Stale
Tech stack
rust

Research direction

Start by running cargo test from the crates.io archive and inspect src/tests.rs, especially the include_str! references to the listed JSON fixtures. Compare the archive contents with the repository’s expected files; done means the archive’s cargo test completes without missing-file errors.

Written by the indexing model from the issue text.

Description

enhancement help wanted
error: couldn't read src/css-parsing-tests/component_value_list.json: No such file or directory (os error 2)
   --> src/tests.rs:112:20
    |
112 |     run_json_tests(include_str!("css-parsing-tests/component_value_list.json"), |input| {
    |                    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

error: couldn't read src/css-parsing-tests/one_component_value.json: No such file or directory (os error 2)
   --> src/tests.rs:120:20
    |
120 |     run_json_tests(include_str!("css-parsing-tests/one_component_value.json"), |input| {
    |                    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

error: couldn't read src/css-parsing-tests/declaration_list.json: No such file or directory (os error 2)
   --> src/tests.rs:131:20
    |
131 |     run_json_tests(include_str!("css-parsing-tests/declaration_list.json"), |input| {
    |                    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

error: couldn't read src/css-parsing-tests/one_declaration.json: No such file or directory (os error 2)
   --> src/tests.rs:141:20
    |
141 |     run_json_tests(include_str!("css-parsing-tests/one_declaration.json"), |input| {
    |                    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

error: couldn't read src/css-parsing-tests/rule_list.json: No such file or directory (os error 2)
   --> src/tests.rs:149:20
    |
149 |     run_json_tests(include_str!("css-parsing-tests/rule_list.json"), |input| {
    |                    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

error: couldn't read src/css-parsing-tests/stylesheet.json: No such file or directory (os error 2)
   --> src/tests.rs:159:20
    |
159 |     run_json_tests(include_str!("css-parsing-tests/stylesheet.json"), |input| {
    |                    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

error: couldn't read src/css-parsing-tests/one_rule.json: No such file or directory (os error 2)
   --> src/tests.rs:169:20
    |
169 |     run_json_tests(include_str!("css-parsing-tests/one_rule.json"), |input| {
    |                    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

error: couldn't read src/css-parsing-tests/stylesheet_bytes.json: No such file or directory (os error 2)
   --> src/tests.rs:197:24
    |
197 |     run_raw_json_tests(include_str!("css-parsing-tests/stylesheet_bytes.json"),
    |                        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

error: couldn't read src/css-parsing-tests/color3.json: No such file or directory (os error 2)
   --> src/tests.rs:348:21
    |
348 |     run_color_tests(include_str!("css-parsing-tests/color3.json"), |c| c.ok().to_json())
    |                     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

error: couldn't read src/css-parsing-tests/color3_hsl.json: No such file or directory (os error 2)
   --> src/tests.rs:354:21
    |
354 |     run_color_tests(include_str!("css-parsing-tests/color3_hsl.json"), |c| c.ok().to_json())
    |                     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

error: couldn't read src/css-parsing-tests/color3_keywords.json: No such file or directory (os error 2)
   --> src/tests.rs:361:21
    |
361 |     run_color_tests(include_str!("css-parsing-tests/color3_keywords.json"), |c| c.ok().to_json())
    |                     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

error: couldn't read src/css-parsing-tests/An+B.json: No such file or directory (os error 2)
   --> src/tests.rs:367:20
    |
367 |     run_json_tests(include_str!("css-parsing-tests/An+B.json"), |input| {
    |                    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

error: couldn't read src/css-parsing-tests/urange.json: No such file or directory (os error 2)
   --> src/tests.rs:377:20
    |
377 |     run_json_tests(include_str!("css-parsing-tests/urange.json"), |input| {
    |                    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

error: couldn't read src/css-parsing-tests/component_value_list.json: No such file or directory (os error 2)
   --> src/tests.rs:403:20
    |
403 |     run_json_tests(include_str!("css-parsing-tests/component_value_list.json"), |input| {
    |                    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

error: aborting due to 14 previous errors
Dominant language
Rust
Stars
869
Forks
152
Avg merge
15h 8m
Merged PRs (30d)
12

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from servo/rust-cssparser

All issues in servo/rust-cssparser

Similar issues

More Rust issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.