diff --git a/NOTICE b/NOTICE index 2311ef0907..ab384a5222 100644 --- a/NOTICE +++ b/NOTICE @@ -345,6 +345,8 @@ vendor/linesweeper with its upstream license files and one local patch. Its mani as author, and its LICENSE-MIT reads "Copyright (c) 2018 Raph Levien". See vendor/linesweeper with its upstream license files and one local patch. Its manifest names Joe Neeman as author, and its LICENSE-MIT reads "Copyright (c) 2018 Raph Levien". See +vendor/linesweeper with its upstream license files and one local patch. Its manifest names Joe Neeman +as author, and its LICENSE-MIT reads "Copyright (c) 2018 Raph Levien". See vendor/linesweeper/README.craft.md and vendor/linesweeper/SOURCE.json for provenance, the local patch and the files left out. diff --git a/vendor/linesweeper/README.craft.md b/vendor/linesweeper/README.craft.md index 05273b5097..3a9dc3c911 100644 --- a/vendor/linesweeper/README.craft.md +++ b/vendor/linesweeper/README.craft.md @@ -309,6 +309,10 @@ local patch listed below. `.cargo_vcs_info.json` names the commit it was package `824b0791a750f7b27b8edcbb6c6244d0e629875e`. That commit is not in the GitHub repository the manifest names, which is archived; its README says development moved off GitHub. +local patch listed below. `.cargo_vcs_info.json` names the commit it was packaged from, +`824b0791a750f7b27b8edcbb6c6244d0e629875e`. That commit is not in the GitHub repository the manifest +names, which is archived; its README says development moved off GitHub. + Every file here except this one, `SOURCE.json` and the patched file below is byte for byte the file in the `.crate` archive. `SOURCE.json` records the hash of the `.crate` download (`source_archive_sha256`) and, for every file kept, the hash in the package (`source_sha256`) and the @@ -400,6 +404,7 @@ Every change here updates this table and `SOURCE.json` in the same commit. | `src/curve/transverse.rs` | `transversal_after` returns `false` when either dy/dt bound it divides by is zero, negative or nan. It compared the two slope bounds by cross-multiplying, which reverses the comparison when a bound is negative. Two curves that leave a shared start point in opposite directions, with their first control points one ulp below the start, were reported as keeping their left-to-right order although they cross. `transversal_before` reflects its curves and calls `transversal_after`, so it returned the same wrong answer. The `crossing_with_negative_start_dy` test checks both functions. | | `src/curve/mod.rs` | `CurveOrder::with_y_slop` keeps the comparison's `metrics` when it changes the entries, instead of returning empty metrics. Code comments label the change `Craft patch (y-slop metrics)`. The `y_slop_keeps_metrics` test applies slop to an order with one metrics entry. | | `src/sweep/sweep_line.rs` | The doc comment of `SweepLine::line_segment` says it can return a segment that has exited, which `segment_range` leaves out. Code comments label the change `Craft patch (exited slots)`. | +| `tests/regression.rs` | The test escapes `CARGO_MANIFEST_DIR` with `glob::Pattern::escape` and fails when it finds no inputs. A checkout path containing `[` used to match no files, so the test ran zero cases and passed. Code comments label the change `Craft patch (regression glob)`. | `omitted_files` lists the 43 files of the package left out here, with their hashes: diff --git a/vendor/linesweeper/SOURCE.json b/vendor/linesweeper/SOURCE.json index 0a3fa4094d..a780fd5224 100644 --- a/vendor/linesweeper/SOURCE.json +++ b/vendor/linesweeper/SOURCE.json @@ -80,6 +80,7 @@ "In `src/curve/transverse.rs`, `transversal_after` (and `transversal_before`, which calls it) returns `false` when either dy/dt bound is not positive, instead of cross-multiplying the slope bounds, which reverses the comparison for a negative bound." "In `src/curve/mod.rs`, `CurveOrder::with_y_slop` keeps the comparison's `metrics` when it changes the entries, instead of returning empty metrics. `y_slop_keeps_metrics` tests it." "In `src/sweep/sweep_line.rs`, the doc comment of `SweepLine::line_segment` says it can return a segment that has exited, which `segment_range` leaves out." + "In `tests/regression.rs`, the test escapes `CARGO_MANIFEST_DIR` with `glob::Pattern::escape` and fails when it finds no inputs, so a checkout path containing `[` no longer gives a passing run of zero cases." ], "files": [ { "path": ".cargo_vcs_info.json", "source_sha256": "47fba6a9dbdf445a5c97f783c9be62093035f9d5e5cdc2cf3216ad8259bcd8fc", "source_git_blob": null, "sha256": "47fba6a9dbdf445a5c97f783c9be62093035f9d5e5cdc2cf3216ad8259bcd8fc" }, @@ -256,6 +257,8 @@ { "path": "tests/paperjs.rs", "source_sha256": "6ff2a3178f13cde3d7304101ae592ae32b4b2734069f5fc56a532a4883d9f782", "source_git_blob": null, "sha256": "3091c6994deffd069459d8433f0bb3f7e7f7672173257cf339a3a02ef7fb6920" }, { "path": "tests/paperjs.rs", "source_sha256": "6ff2a3178f13cde3d7304101ae592ae32b4b2734069f5fc56a532a4883d9f782", "source_git_blob": null, "sha256": "912c846f6da58f7c89431e8f4d6e771e6ebdbcb36b9c32edf8714d721fbfe200" }, { "path": "tests/regression.rs", "source_sha256": "b2341934aa001ba26c688a1ca3a7ee55d29105d67b6036bb05bb367b69976fce", "source_git_blob": null, "sha256": "b2341934aa001ba26c688a1ca3a7ee55d29105d67b6036bb05bb367b69976fce" }, + { "path": "tests/paperjs.rs", "source_sha256": "6ff2a3178f13cde3d7304101ae592ae32b4b2734069f5fc56a532a4883d9f782", "source_git_blob": null, "sha256": "6ff2a3178f13cde3d7304101ae592ae32b4b2734069f5fc56a532a4883d9f782" }, + { "path": "tests/regression.rs", "source_sha256": "b2341934aa001ba26c688a1ca3a7ee55d29105d67b6036bb05bb367b69976fce", "source_git_blob": null, "sha256": "cd54aaed5ceea3e28da6cbdcf34fa9701dd2c94098c65302208862fdd5ebce09" }, { "path": "tests/regression/awesome_0.txt", "source_sha256": "6f7dfbb7ca62463843c058617d557553fdc8d8b3add512bee8f813b37a256611", "source_git_blob": null, "sha256": "6f7dfbb7ca62463843c058617d557553fdc8d8b3add512bee8f813b37a256611" }, { "path": "tests/regression/graphite_0.txt", "source_sha256": "f5d9e94ae6fab7d29f8a3aa0ccd9d96fc9b709c0ee3fbae8b000bec8c33628b9", "source_git_blob": null, "sha256": "f5d9e94ae6fab7d29f8a3aa0ccd9d96fc9b709c0ee3fbae8b000bec8c33628b9" }, { "path": "tests/regression/graphite_1.txt", "source_sha256": "96f147b6fc95a71600f60541cc687598e04e9d810dd8a3c57b0f5d8220a72823", "source_git_blob": null, "sha256": "96f147b6fc95a71600f60541cc687598e04e9d810dd8a3c57b0f5d8220a72823" }, diff --git a/vendor/linesweeper/tests/regression.rs b/vendor/linesweeper/tests/regression.rs index 4c55b8edaa..461262084a 100644 --- a/vendor/linesweeper/tests/regression.rs +++ b/vendor/linesweeper/tests/regression.rs @@ -12,15 +12,19 @@ fn main() { fn regression_tests() -> Vec { let ws = std::env::var("CARGO_MANIFEST_DIR").unwrap(); - let paths = glob::glob(&format!("{ws}/tests/regression/**/*.txt")).unwrap(); - paths - .into_iter() + // Craft patch (regression glob): a checkout path can hold glob + // metacharacters such as `[`, and a run that finds no inputs is a failure. + let pattern = format!("{}/tests/regression/**/*.txt", glob::Pattern::escape(&ws)); + let trials: Vec = glob::glob(&pattern) + .unwrap() .map(|p| { let p = p.unwrap(); let name = input_path_base(&p).display().to_string(); Trial::test(name, || generate_regression_test(p)) }) - .collect() + .collect(); + assert!(!trials.is_empty(), "no regression inputs under {ws}"); + trials } fn input_path_base(input_path: &Path) -> &Path {