Skip to content

Commit

Permalink
Add regression test for components
Browse files Browse the repository at this point in the history
  • Loading branch information
GuillaumeGomez committed Apr 10, 2024
1 parent 1533bbe commit a8f8dda
Showing 1 changed file with 17 additions and 0 deletions.
17 changes: 17 additions & 0 deletions tests/components.rs
@@ -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());
}

0 comments on commit a8f8dda

Please sign in to comment.