1
0
mirror of https://gitlab.com/Anson-Projects/anson-stuff/zinetest.git synced 2025-06-15 13:36:39 +00:00
This commit is contained in:
Anson Biggs 2024-02-11 23:23:14 -07:00
parent 4d5cb275f8
commit bf4d057135

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!")
}
} }