File tree Expand file tree Collapse file tree 1 file changed +5
-6
lines changed Expand file tree Collapse file tree 1 file changed +5
-6
lines changed Original file line number Diff line number Diff line change @@ -6,15 +6,14 @@ function test_shortname(tc)
6
6
7
7
tc .assumeTrue(ispc , " Windows only" )
8
8
9
- test_file = stdlib .fileio .posix(fullfile( getenv(" LocalAppData " ), " Microsoft/WindowsApps/notepad.exe " ));
10
- tc .assumeTrue(isfile( test_file ) )
9
+ progdir = stdlib .fileio .posix(getenv(" PROGRAMFILES " ));
10
+ tc .assumeTrue(isfolder( progdir ), " Env:ProgramFiles not defined " )
11
11
12
- short = stdlib .fileio .windows_shortname(test_file );
12
+ short = stdlib .fileio .windows_shortname(progdir );
13
13
14
- tc .verifyTrue(endsWith(short , ' notepad.exe' ), " Short name should end with 'notepad.exe'" )
15
- tc .verifyTrue(contains(short , " MICROS~1" ))
14
+ tc .verifyTrue(contains(short , " PROGRA~1" ), short + " did not contain PROGRA~1" )
16
15
17
- tc .verifyEqual(stdlib .canonical(short ), test_file )
16
+ tc .verifyEqual(stdlib .canonical(short ), progdir )
18
17
19
18
end
20
19
You can’t perform that action at this time.
0 commit comments