mirror of
https://gitlab.com/Anson-Projects/anson-stuff/zinetest.git
synced 2025-06-15 13:36:39 +00:00
Closes #2
This commit is contained in:
parent
4d5cb275f8
commit
bf4d057135
@ -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!")
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user