teaql-tool-std 0.1.1

Zero-dependency standard utilities for the TeaQL Tool ecosystem.
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
use teaql_tool_std::system::SystemTool;
use std::env;

#[test]
fn test_system_operations() {
    let tool = SystemTool::new();
    
    unsafe { env::set_var("TEAQL_TEST_ENV", "123") };
    
    assert_eq!(tool.env("TEAQL_TEST_ENV").unwrap(), "123");
    assert_eq!(tool.env_or("TEAQL_NON_EXIST", "default"), "default");
    
    assert!(!tool.os().is_empty());
    assert!(!tool.arch().is_empty());
    assert!(tool.current_dir().is_some());
}