1+ use uefi:: CStr16 ;
12use uefi:: boot;
23use uefi:: proto:: shell:: Shell ;
3- use uefi:: CStr16 ;
44use uefi_raw:: Status ;
55
66pub fn test ( ) {
@@ -68,7 +68,9 @@ pub fn test() {
6868 let status = shell. set_cur_dir ( Some ( fs_var) , Some ( dir_var) ) ;
6969 assert_eq ! ( status, Status :: SUCCESS ) ;
7070
71- let cur_fs_str = shell. get_cur_dir ( Some ( fs_var) ) . expect ( "Could not get the current file system mapping" ) ;
71+ let cur_fs_str = shell
72+ . get_cur_dir ( Some ( fs_var) )
73+ . expect ( "Could not get the current file system mapping" ) ;
7274 let expected_fs_str = CStr16 :: from_str_with_buf ( "FS0:\\ " , & mut test_buf) . unwrap ( ) ;
7375 assert_eq ! ( cur_fs_str, expected_fs_str) ;
7476
@@ -77,7 +79,9 @@ pub fn test() {
7779 let status = shell. set_cur_dir ( Some ( fs_var) , Some ( dir_var) ) ;
7880 assert_eq ! ( status, Status :: SUCCESS ) ;
7981
80- let cur_fs_str = shell. get_cur_dir ( Some ( fs_var) ) . expect ( "Could not get the current file system mapping" ) ;
82+ let cur_fs_str = shell
83+ . get_cur_dir ( Some ( fs_var) )
84+ . expect ( "Could not get the current file system mapping" ) ;
8185 assert_ne ! ( cur_fs_str, expected_fs_str) ;
8286 let expected_fs_str = CStr16 :: from_str_with_buf ( "FS1:\\ " , & mut test_buf) . unwrap ( ) ;
8387 assert_eq ! ( cur_fs_str, expected_fs_str) ;
@@ -87,7 +91,9 @@ pub fn test() {
8791 let status = shell. set_cur_dir ( Some ( fs_var) , Some ( dir_var) ) ;
8892 assert_eq ! ( status, Status :: SUCCESS ) ;
8993
90- let cur_fs_str = shell. get_cur_dir ( Some ( fs_var) ) . expect ( "Could not get the current file system mapping" ) ;
94+ let cur_fs_str = shell
95+ . get_cur_dir ( Some ( fs_var) )
96+ . expect ( "Could not get the current file system mapping" ) ;
9197 assert_ne ! ( cur_fs_str, expected_fs_str) ;
9298 let expected_fs_str = CStr16 :: from_str_with_buf ( "FS0:\\ efi" , & mut test_buf) . unwrap ( ) ;
9399 assert_eq ! ( cur_fs_str, expected_fs_str) ;
@@ -96,17 +102,23 @@ pub fn test() {
96102 let dir_var = CStr16 :: from_str_with_buf ( "fs0:/" , & mut dir_buf) . unwrap ( ) ;
97103 let status = shell. set_cur_dir ( None , Some ( dir_var) ) ;
98104 assert_eq ! ( status, Status :: SUCCESS ) ;
99- let cur_fs_str = shell. get_cur_dir ( Some ( fs_var) ) . expect ( "Could not get the current file system mapping" ) ;
105+ let cur_fs_str = shell
106+ . get_cur_dir ( Some ( fs_var) )
107+ . expect ( "Could not get the current file system mapping" ) ;
100108 let expected_fs_str = CStr16 :: from_str_with_buf ( "FS0:" , & mut test_buf) . unwrap ( ) ;
101109 assert_eq ! ( cur_fs_str, expected_fs_str) ;
102110
103- let cur_fs_str = shell. get_cur_dir ( None ) . expect ( "Could not get the current file system mapping" ) ;
111+ let cur_fs_str = shell
112+ . get_cur_dir ( None )
113+ . expect ( "Could not get the current file system mapping" ) ;
104114 assert_eq ! ( cur_fs_str, expected_fs_str) ;
105115
106116 let dir_var = CStr16 :: from_str_with_buf ( "/efi" , & mut dir_buf) . unwrap ( ) ;
107117 let status = shell. set_cur_dir ( None , Some ( dir_var) ) ;
108118 assert_eq ! ( status, Status :: SUCCESS ) ;
109- let cur_fs_str = shell. get_cur_dir ( Some ( fs_var) ) . expect ( "Could not get the current file system mapping" ) ;
119+ let cur_fs_str = shell
120+ . get_cur_dir ( Some ( fs_var) )
121+ . expect ( "Could not get the current file system mapping" ) ;
110122 let expected_fs_str = CStr16 :: from_str_with_buf ( "FS0:\\ efi" , & mut test_buf) . unwrap ( ) ;
111123 assert_eq ! ( cur_fs_str, expected_fs_str) ;
112124
0 commit comments