1
0
mirror of https://gitlab.com/Anson-Projects/anson-stuff/zinetest.git synced 2025-06-15 21:46:40 +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] #[test]
fn test_if_feeds_are_in_alphabetical_order() { fn test_if_feeds_are_in_alphabetical_order() {
let urls = read_feed(); let mut urls = read_feed();
assert!( if !urls.windows(2).all(|w| w[0] < w[1]) {
urls.windows(2).all(|w| w[0] < w[1]), println!("Sorted feeds.txt:");
"feeds.txt is not sorted alphabetically"
) urls.sort();
for url in urls {
println!("{}", url);
}
panic!("\nfeeds.txt was not sorted!")
}
} }