@@ -19,16 +19,31 @@ pub fn test() {
1919 let cur_env_str = shell. get_env ( None ) . expect ( "Could not get environment variable" ) ;
2020 info ! ( "cur_env_str size: {}" , cur_env_str. num_chars( ) ) ;
2121 info ! ( "cur_env_str: {}" , cur_env_str) ;
22+
23+ /* Testing setting and getting a specific environment variable */
24+ let mut test_env_buf = [ 0u16 ; 32 ] ;
25+ let test_var = CStr16 :: from_str_with_buf ( "test_var" , & mut test_env_buf) . unwrap ( ) ;
26+ let mut test_val_buf = [ 0u16 ; 32 ] ;
27+ let test_val = CStr16 :: from_str_with_buf ( "test_val" , & mut test_val_buf) . unwrap ( ) ;
28+ assert ! ( shell. get_env( Some ( test_var) ) . is_none( ) ) ;
29+ shell. set_env ( test_var, test_val, false ) ;
30+ let cur_env_str = shell. get_env ( Some ( test_var) ) . expect ( "Could not get environment variable" ) ;
31+ assert_eq ! ( cur_env_str, test_val) ;
32+
2233 // for (i, c) in cur_env_str.iter().enumerate() {
2334 // info!("cur_env_str: i: {}, c: {}", i, c);
2435 // }
2536
2637 // let mut cur_fs_buf = [0u16; 32];
2738 // let cur_fs_str = CStr16::from_str_with_buf("", &mut cur_fs_buf).unwrap();
2839 // info!("cur_fs_str size 1: {}", cur_fs_str.num_chars());
29- let cur_fs_str = shell. get_cur_dir ( None ) . expect ( "Could not get the current file system mapping" ) ;
30- info ! ( "cur_fs_str size: {}" , cur_fs_str. num_chars( ) ) ;
31- info ! ( "cur_fs_str: {}" , cur_fs_str) ;
40+
41+
42+ // let cur_fs_str = shell.get_cur_dir(None).expect("Could not get the current file system mapping");
43+ // info!("cur_fs_str size: {}", cur_fs_str.num_chars());
44+ // info!("cur_fs_str: {}", cur_fs_str);
45+
46+
3247 // for (i, c) in cur_fs_str.iter().enumerate() {
3348 // info!("cur_fs_str: i: {}, c: {}", i, c);
3449 // }
0 commit comments