2 :: PROJECT: ReactOS CMD Testing Suite
3 :: LICENSE: GPL v2 or any later version
4 :: FILE: tests/environment.cmd
5 :: PURPOSE: Tests for the environment (like automatically set variables)
6 :: COPYRIGHT: Copyright 2008 Colin Finck <mail@colinfinck.de>
9 :: ~0 contains the called path to the current script file
12 :: ~d0 contains the drive of the current script file
13 call :_testvar %~d0 ~d0
15 :: ~p0 contains the path of the current script file without the drive letter
16 call :_testvar %~p0 ~p0
18 :: ~dp0 contains the path to the current script file with the drive letter
19 call :_testvar %~dp0 ~dp0
21 :: ~dpf0 contains the full path to the current script file
22 call :_testvar %~dpf0 ~dpf0
24 :: ~n0 contains the name of the current script file without extension
25 call :_testvar %~n0 ~n0
27 :: ~x0 contains the extension of the current script file
28 call :_testvar %~x0 ~x0
30 :: ~a0 contains the attributes of the current script file
31 call :_testvar %~a0 ~a0
33 :: ~t0 contains the date and time of the current script file
34 call :_testvar "%~t0" ~t0
36 :: ~z0 contains the file size of the current script file in bytes
37 call :_testvar %~z0 ~z0
39 :: ~s0 and ~spf0 contain the short path to the current script file
40 call :_testvar %~s0 ~s0
41 call :_testvar %~s0 ~s0 %~spf0%
43 :: Now try to verify that the information is valid
44 set test_path=%~d0%~p0%~n0%~x0
45 call :_testvar %test_path% test_path %~dpf0