|
|
@@ -13,8 +13,8 @@ fn can_parse_multilingual_site() { |
|
|
|
let mut site = Site::new(&path, "config.toml").unwrap(); |
|
|
|
site.load().unwrap(); |
|
|
|
|
|
|
|
assert_eq!(site.library.pages().len(), 9); |
|
|
|
assert_eq!(site.library.sections().len(), 4); |
|
|
|
assert_eq!(site.library.pages().len(), 10); |
|
|
|
assert_eq!(site.library.sections().len(), 6); |
|
|
|
|
|
|
|
// default index sections |
|
|
|
let default_index_section = |
|
|
@@ -79,4 +79,15 @@ fn can_build_multilingual_site() { |
|
|
|
assert!(file_exists!(public, "sitemap.xml")); |
|
|
|
assert!(file_contains!(public, "sitemap.xml", "https://example.com/blog/something-else/")); |
|
|
|
assert!(file_contains!(public, "sitemap.xml", "https://example.com/fr/blog/something-else/")); |
|
|
|
assert!(file_contains!(public, "sitemap.xml", "https://example.com/it/blog/something-else/")); |
|
|
|
|
|
|
|
// one rss per language |
|
|
|
assert!(file_exists!(public, "rss.xml")); |
|
|
|
assert!(file_contains!(public, "rss.xml", "https://example.com/blog/something-else/")); |
|
|
|
assert!(!file_contains!(public, "rss.xml", "https://example.com/fr/blog/something-else/")); |
|
|
|
assert!(file_exists!(public, "fr/rss.xml")); |
|
|
|
assert!(!file_contains!(public, "fr/rss.xml", "https://example.com/blog/something-else/")); |
|
|
|
assert!(file_contains!(public, "fr/rss.xml", "https://example.com/fr/blog/something-else/")); |
|
|
|
// Italian doesn't have RSS enabled |
|
|
|
assert!(!file_exists!(public, "it/rss.xml")); |
|
|
|
} |