1
0
mirror of https://gitlab.com/Anson-Projects/anson-stuff/zinetest.git synced 2025-06-15 13:36:39 +00:00

Merge branch 'upgrade_alphabetical_test' into 'master'

Closes #2

Closes #2

See merge request MisterBiggs/zine!2
This commit is contained in:
Anson Biggs 2024-02-12 06:26:28 +00:00
commit a6f828e8ea

View File

@ -33,10 +33,16 @@ fn test_that_urls_point_to_valid_feeds() {
#[test]
fn test_if_feeds_are_in_alphabetical_order() {
let urls = read_feed();
let mut urls = read_feed();
assert!(
urls.windows(2).all(|w| w[0] < w[1]),
"feeds.txt is not sorted alphabetically"
)
if !urls.windows(2).all(|w| w[0] < w[1]) {
println!("Sorted feeds.txt:");
urls.sort();
for url in urls {
println!("{}", url);
}
panic!("\nfeeds.txt was not sorted!")
}
}