-
-
Notifications
You must be signed in to change notification settings - Fork 305
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
1533bbe
commit a8f8dda
Showing
1 changed file
with
17 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
// Take a look at the license at the top of the repository in the LICENSE file. | ||
|
||
#[test] | ||
fn test_components() { | ||
use std::env::var; | ||
|
||
let mut c = sysinfo::Components::new(); | ||
assert!(c.is_empty()); | ||
|
||
// Unfortunately, we can't get components in the CI... | ||
if !sysinfo::IS_SUPPORTED_SYSTEM || cfg!(windows) || var("CI").is_ok() { | ||
return; | ||
} | ||
|
||
c.refresh_list(); | ||
assert!(!c.is_empty()); | ||
} |