From 2730296c140c3240e673963592a44199d87d0097 Mon Sep 17 00:00:00 2001 From: Llywelwyn Date: Sat, 9 Sep 2023 08:57:30 +0100 Subject: [PATCH] inflect to inflect-rs --- Cargo.toml | 6 +++--- README.md | 4 +++- src/{inflect.rs => inflect_rs.rs} | 0 src/lib.rs | 4 ++-- tests/{inflect_tests.rs => inflect_rs_tests.rs} | 4 +++- 5 files changed, 11 insertions(+), 7 deletions(-) rename src/{inflect.rs => inflect_rs.rs} (100%) rename tests/{inflect_tests.rs => inflect_rs_tests.rs} (95%) diff --git a/Cargo.toml b/Cargo.toml index 5d29654..22cfafc 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,10 +1,10 @@ [package] -name = "inflect" +name = "inflect-rs" version = "0.1.0" authors = ["Lewis Wynne "] edition = "2021" -publish = false -description = "inflect is a Rust port of the Python inflect library, used to generate plurals, ordinals, indefinite articles, and to convert numbers to words." +publish = true +description = "inflect-rs is a Rust port of the Python inflect library, used to generate plurals, ordinals, indefinite articles, and to convert numbers to words." homepage = "https://github.com/llywelwyn/inflect_rs" repository = "https://github.com/llywelwyn/inflect_rs" readme = "README.md" diff --git a/README.md b/README.md index d623589..76e729c 100644 --- a/README.md +++ b/README.md @@ -1 +1,3 @@ -# inflect \ No newline at end of file +# inflect-rs + +inflect-rs is a Rust port of the Python inflect library, used to generate plurals, ordinals, indefinite articles, and to convert numbers to words. \ No newline at end of file diff --git a/src/inflect.rs b/src/inflect_rs.rs similarity index 100% rename from src/inflect.rs rename to src/inflect_rs.rs diff --git a/src/lib.rs b/src/lib.rs index b74f831..90382dc 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -1,6 +1,6 @@ -mod inflect; +mod inflect_rs; /// inflect_rs is a Rust port of the Python inflect library. /// It is used to generate plurals, ordinals, indefinite articles, and to convert numbers to words. -pub use crate::inflect::*; +pub use crate::inflect_rs::*; diff --git a/tests/inflect_tests.rs b/tests/inflect_rs_tests.rs similarity index 95% rename from tests/inflect_tests.rs rename to tests/inflect_rs_tests.rs index e5169e9..022f435 100644 --- a/tests/inflect_tests.rs +++ b/tests/inflect_rs_tests.rs @@ -1,4 +1,4 @@ -use inflect::*; +use inflect_rs::*; #[test] fn test_enclose() { @@ -47,7 +47,9 @@ fn test_si_pron() { assert_eq!("him", get_si_pron("acc", "them", Some("masculine"))); assert_eq!("her", get_si_pron("acc", "them", Some("feminine"))); assert_eq!("it", get_si_pron("acc", "them", Some("neuter"))); + assert_eq!("you", get_si_pron("acc", "you", None)); assert_eq!("themselves", get_si_pron("acc", "itself", None)); + assert_ne!("him", get_si_pron("acc", "them", Some("feminine"))); assert_ne!("her", get_si_pron("acc", "them", Some("masculine"))); }