1:: 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> 7:: 8 9:: ~0 contains the called path to the current script file 10call :_testvar %~0 ~0 11 12:: ~d0 contains the drive of the current script file 13call :_testvar %~d0 ~d0 14 15:: ~p0 contains the path of the current script file without the drive letter 16call :_testvar %~p0 ~p0 17 18:: ~dp0 contains the path to the current script file with the drive letter 19call :_testvar %~dp0 ~dp0 20 21:: ~dpf0 contains the full path to the current script file 22call :_testvar %~dpf0 ~dpf0 23 24:: ~n0 contains the name of the current script file without extension 25call :_testvar %~n0 ~n0 26 27:: ~x0 contains the extension of the current script file 28call :_testvar %~x0 ~x0 29 30:: ~a0 contains the attributes of the current script file 31call :_testvar %~a0 ~a0 32 33:: ~t0 contains the date and time of the current script file 34call :_testvar "%~t0" ~t0 35 36:: ~z0 contains the file size of the current script file in bytes 37call :_testvar %~z0 ~z0 38 39:: ~s0 and ~spf0 contain the short path to the current script file 40call :_testvar %~s0 ~s0 41call :_testvar %~s0 ~s0 %~spf0% 42 43:: Now try to verify that the information is valid 44set test_path=%~d0%~p0%~n0%~x0 45call :_testvar %test_path% test_path %~dpf0 46 47goto :EOF 48