summaryrefslogtreecommitdiffstats
path: root/Tests/Complex
diff options
context:
space:
mode:
authorBill Hoffman <bill.hoffman@kitware.com>2004-10-25 16:15:37 (GMT)
committerBill Hoffman <bill.hoffman@kitware.com>2004-10-25 16:15:37 (GMT)
commite26c14e5d3bac5541d3e4662845030b7aaa3c161 (patch)
tree0943a749057398c4086b1218d3ac6220782ab167 /Tests/Complex
parent7ed631311c2b85eb927f22b01ed29619d957f132 (diff)
downloadCMake-e26c14e5d3bac5541d3e4662845030b7aaa3c161.zip
CMake-e26c14e5d3bac5541d3e4662845030b7aaa3c161.tar.gz
CMake-e26c14e5d3bac5541d3e4662845030b7aaa3c161.tar.bz2
ENH: add test back for single char exe
Diffstat (limited to 'Tests/Complex')
-rw-r--r--Tests/Complex/Executable/complex.cxx28
1 files changed, 28 insertions, 0 deletions
diff --git a/Tests/Complex/Executable/complex.cxx b/Tests/Complex/Executable/complex.cxx
index adf99d7..441a291 100644
--- a/Tests/Complex/Executable/complex.cxx
+++ b/Tests/Complex/Executable/complex.cxx
@@ -111,7 +111,35 @@ int main()
lib += CMAKE_INTDIR;
lib += "/";
#endif
+ std::string exe = lib;
+ // Test a single character executable to test a: in makefiles
+ exe += "A";
+ exe += cmSystemTools::GetExecutableExtension();
+ int ret;
+ std::string errorMessage;
+ if(cmSystemTools::RunSingleCommand(exe.c_str(), 0, &ret))
+ {
+ if(ret != 10)
+ {
+ errorMessage += exe;
+ errorMessage += " did not return 10";
+ }
+ }
+ else
+ {
+ errorMessage += exe;
+ errorMessage += ": failed to run.";
+ }
+ if(errorMessage.size())
+ {
+ cmFailed(errorMessage.c_str());
+ }
+ else
+ {
+ cmPassed("run Single Character executable A returned 10 as expected.");
+ }
+
lib += cmDynamicLoader::LibPrefix();
lib += "CMakeTestModule";
lib += cmDynamicLoader::LibExtension();