This script uses the SASUnit framework to test the '_getAbsPathComponents' macro. It defines test cases to verify the macro's behavior when faced with a complete absolute path and when faced with a simple filename. The results (filename and path) are stored in macro variables and compared to expected values via %assertEquals.
Data Analysis
Type : CREATION_INTERNE
Data consists of static character strings provided as arguments to macros. No external tables are used.
1 Code Block
MACRO CALL
Explanation : Initialization of the SASUnit test scenario with a description.
Copied!
%initScenario (i_desc=Test of _getAbsPathComponents.sas);
1
%initScenario (i_desc=Test of _getAbsPathComponents.sas);
2
2 Code Block
MACRO CALL
Explanation : Test Case 1: Tests splitting a full path (C:/temp/test.sas). The macro should return 'C:/temp' in the r_pathWithoutName variable and 'test.sas' in r_fileName.
Explanation : Test Case 2: Tests the case where only the filename is provided (test.sas). The macro should return an empty string for the path and 'test.sas' for the filename.
This material is provided "as is" by We Are Cas. There are no warranties, expressed or implied, as to merchantability or fitness for a particular purpose regarding the materials or code contained herein. We Are Cas is not responsible for errors in this material as it now exists or will exist, nor does We Are Cas provide technical support for it.
Copyright Info : Copyright 2010-2023 HMS Analytical Software GmbH
SAS and all other SAS Institute Inc. product or service names are registered trademarks or trademarks of SAS Institute Inc. in the USA and other countries. ® indicates USA registration. WeAreCAS is an independent community site and is not affiliated with SAS Institute Inc.
This site uses technical and analytical cookies to improve your experience.
Read more.