Skip to content
Merged
Show file tree
Hide file tree
Changes from 8 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,4 +8,4 @@ jobs:
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@stable
- run: cargo build
- run: cargo test
- run: cargo test --features=_test-unicode-conformance
345 changes: 344 additions & 1 deletion Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 4 additions & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -13,3 +13,7 @@ keywords = ["unicode", "symbols"]
[features]
default = ["styling"]
styling = []
_test-unicode-conformance = ["ureq"]

[build-dependencies]
ureq = { version = "3.0.12", optional = true }
18 changes: 18 additions & 0 deletions build.rs
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,24 @@ fn main() {
let out = std::env::var_os("OUT_DIR").unwrap();
let dest = Path::new(&out).join("out.rs");
std::fs::write(&dest, buf).unwrap();

#[cfg(feature = "_test-unicode-conformance")]
{
let emoji_vs_list = Path::new(&out).join("emoji-variation-sequences.txt");
if !std::fs::read_to_string(&emoji_vs_list)
.is_ok_and(|text| text.contains("Emoji Version 16.0"))
{
let content = ureq::get(
"https://www.unicode.org/Public/16.0.0/ucd/emoji/emoji-variation-sequences.txt",
)
.call()
.unwrap()
.body_mut()
.read_to_string()
.unwrap();
std::fs::write(emoji_vs_list, content).unwrap();
}
}
}

/// Processes a single file and turns it into a global module.
Expand Down
Loading