33use uefi:: boot:: ScopedProtocol ;
44use uefi:: proto:: shell:: Shell ;
55use uefi:: { boot, cstr16} ;
6- use uefi_raw:: Status ;
76
87/// Test `var()`, `vars()`, and `set_var()`
98pub fn test_env ( shell : & ScopedProtocol < Shell > ) {
@@ -21,7 +20,7 @@ pub fn test_env(shell: &ScopedProtocol<Shell>) {
2120 let test_val = cstr16 ! ( "test_val" ) ;
2221 assert ! ( shell. var( test_var) . is_none( ) ) ;
2322 let status = shell. set_var ( test_var, test_val, false ) ;
24- assert_eq ! ( status, Status :: SUCCESS ) ;
23+ assert ! ( status. is_ok ( ) ) ;
2524 let cur_env_str = shell
2625 . var ( test_var)
2726 . expect ( "Could not get environment variable" ) ;
@@ -49,7 +48,7 @@ pub fn test_env(shell: &ScopedProtocol<Shell>) {
4948 /* Test deleting environment variable */
5049 let test_val = cstr16 ! ( "" ) ;
5150 let status = shell. set_var ( test_var, test_val, false ) ;
52- assert_eq ! ( status, Status :: SUCCESS ) ;
51+ assert ! ( status. is_ok ( ) ) ;
5352 assert ! ( shell. var( test_var) . is_none( ) ) ;
5453
5554 let cur_env_vec = shell. vars ( ) ;
@@ -70,7 +69,7 @@ pub fn test_cur_dir(shell: &ScopedProtocol<Shell>) {
7069 let fs_var = cstr16 ! ( "fs0:" ) ;
7170 let dir_var = cstr16 ! ( "/" ) ;
7271 let status = shell. set_current_dir ( Some ( fs_var) , Some ( dir_var) ) ;
73- assert_eq ! ( status, Status :: SUCCESS ) ;
72+ assert ! ( status. is_ok ( ) ) ;
7473
7574 let cur_fs_str = shell
7675 . current_dir ( Some ( fs_var) )
@@ -82,7 +81,7 @@ pub fn test_cur_dir(shell: &ScopedProtocol<Shell>) {
8281 let fs_var = cstr16 ! ( "fs1:" ) ;
8382 let dir_var = cstr16 ! ( "/" ) ;
8483 let status = shell. set_current_dir ( Some ( fs_var) , Some ( dir_var) ) ;
85- assert_eq ! ( status, Status :: SUCCESS ) ;
84+ assert ! ( status. is_ok ( ) ) ;
8685
8786 let cur_fs_str = shell
8887 . current_dir ( Some ( fs_var) )
@@ -95,7 +94,7 @@ pub fn test_cur_dir(shell: &ScopedProtocol<Shell>) {
9594 let fs_var = cstr16 ! ( "fs0:" ) ;
9695 let dir_var = cstr16 ! ( "efi/" ) ;
9796 let status = shell. set_current_dir ( Some ( fs_var) , Some ( dir_var) ) ;
98- assert_eq ! ( status, Status :: SUCCESS ) ;
97+ assert ! ( status. is_ok ( ) ) ;
9998
10099 let cur_fs_str = shell
101100 . current_dir ( Some ( fs_var) )
@@ -113,7 +112,7 @@ pub fn test_cur_dir(shell: &ScopedProtocol<Shell>) {
113112 // Setting the current working file system and current working directory
114113 let dir_var = cstr16 ! ( "fs0:/" ) ;
115114 let status = shell. set_current_dir ( None , Some ( dir_var) ) ;
116- assert_eq ! ( status, Status :: SUCCESS ) ;
115+ assert ! ( status. is_ok ( ) ) ;
117116 let cur_fs_str = shell
118117 . current_dir ( Some ( fs_var) )
119118 . expect ( "Could not get the current file system mapping" ) ;
@@ -128,7 +127,7 @@ pub fn test_cur_dir(shell: &ScopedProtocol<Shell>) {
128127 // Changing current working directory
129128 let dir_var = cstr16 ! ( "/efi" ) ;
130129 let status = shell. set_current_dir ( None , Some ( dir_var) ) ;
131- assert_eq ! ( status, Status :: SUCCESS ) ;
130+ assert ! ( status. is_ok ( ) ) ;
132131 let cur_fs_str = shell
133132 . current_dir ( Some ( fs_var) )
134133 . expect ( "Could not get the current file system mapping" ) ;
@@ -143,7 +142,7 @@ pub fn test_cur_dir(shell: &ScopedProtocol<Shell>) {
143142 let fs_var = cstr16 ! ( "fs0:" ) ;
144143 let dir_var = cstr16 ! ( "efi/tools" ) ;
145144 let status = shell. set_current_dir ( Some ( fs_var) , Some ( dir_var) ) ;
146- assert_eq ! ( status, Status :: SUCCESS ) ;
145+ assert ! ( status. is_ok ( ) ) ;
147146 let cur_fs_str = shell
148147 . current_dir ( None )
149148 . expect ( "Could not get the current file system mapping" ) ;
0 commit comments