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