We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 14ba67a commit b541c32Copy full SHA for b541c32
tests/tests.rs
@@ -197,6 +197,23 @@ fn test_macro() {
197
assert_eq!(c1, c2);
198
}
199
200
+#[test]
201
+fn test_private_tag() {
202
+ let mut tag: LanguageTag = Default::default();
203
+ tag.privateuse = vec!["foo".to_owned(), "bar".to_owned()];
204
+ assert_eq!(format!("{}", tag), "x-foo-bar");
205
+}
206
+
207
208
+fn test_eq() {
209
+ let mut tag1: LanguageTag = Default::default();
210
+ tag1.language = Some("zh".to_owned());
211
+ let mut tag2: LanguageTag = Default::default();
212
+ tag2.language = Some("zh".to_owned());
213
+ tag2.script = Some("Latn".to_owned());
214
+ assert!(tag1 != tag2);
215
216
217
#[test]
218
fn test_wellformed_tags() {
219
// Source: http://www.langtag.net/test-suites/well-formed-tags.txt
0 commit comments