blob: ef568a7d3e2f7a56413f7f87e050d2e518e80a3f (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
|
extern crate semver;
extern crate crates_index;
extern crate tempdir;
// This test checks to see if every existing crate parses successfully. Important to not break the
// Rust universe!
#[cfg(feature = "ci")]
#[test]
fn test_regressions() {
use tempdir::TempDir;
use crates_index::Index;
use semver::Version;
let dir = TempDir::new("semver").unwrap();
let index = Index::new(dir.into_path());
index.clone().unwrap();
for krate in index.crates() {
for version in krate.versions() {
let v = version.version();
assert!(Version::parse(v).is_ok(), "failed: {} ({})", version.name(), v);
}
}
}
|