mirror of
https://github.com/storytold/cadcraft.git
synced 2026-10-25 03:16:50 -06:00
* Build: line tables only in dev, no debug info for dependencies * Tests: one integration-test binary per crate Each crate's tests/*.rs becomes a module of tests/it/main.rs. Files that install process-wide state (the file io hooks, user aliases, SAVETIME and SAVEFILEPATH, user linetype and pattern files, registered fonts) stay their own test binaries. * xtask ci: nextest, tests without examples, one wasm check call
15 lines
478 B
Rust
15 lines
478 B
Rust
//! `Sub::parse` accepts every spelling its documentation lists (#710).
|
|
|
|
use cadcraft_doc::Sub;
|
|
|
|
#[test]
|
|
fn short_segment_name_matches_the_documented_forms() {
|
|
for spelling in ["seg2", "segment2", "s2"] {
|
|
assert_eq!(Sub::parse(spelling), Some(Sub::Segment(2)), "spelling: {spelling}");
|
|
}
|
|
for spelling in ["s", "start"] {
|
|
assert_eq!(Sub::parse(spelling), Some(Sub::Start), "spelling: {spelling}");
|
|
}
|
|
assert_eq!(Sub::parse("unknown"), None);
|
|
}
|