Commit ba3b7c15 authored by Ken Martin's avatar Ken Martin

ENH: added testing of the WHILE command

parent 8ea0a1a2
......@@ -237,6 +237,11 @@ FOREACH(x "a")
ENDIF(${x} MATCHES "a")
ENDFOREACH(x)
# test WHILE command
SET (while_var 1)
WHILE (while_var LESS 1000)
SET(while_var ${while_var}0)
ENDWHILE(while_var LESS 1000)
#
# Configure file
......
......@@ -656,6 +656,18 @@ int main()
}
#endif
// ----------------------------------------------------------------------
// Test WHILE
if(WHILE_VALUE != 1000)
{
cmFailed("WHILE command is not working");
}
else
{
cmPassed("WHILE command is working");
}
// ----------------------------------------------------------------------
// Test FIND_FILE, FIND_PATH and various GET_FILENAME_COMPONENT combinations
......
......@@ -12,6 +12,9 @@
#define FOREACH_VAR2 "${FOREACH_VAR2}"
#define FOREACH_CONCAT "${FOREACH_CONCAT}"
// Test WHILE
#define WHILE_VALUE ${while_var}
// Test FIND_FILE, FIND_PATH and various GET_FILENAME_COMPONENT combinations
#define FILENAME_VAR_PATH_NAME "${FILENAME_VAR_PATH_NAME}"
......
......@@ -237,6 +237,11 @@ FOREACH(x "a")
ENDIF(${x} MATCHES "a")
ENDFOREACH(x)
# test WHILE command
SET (while_var 1)
WHILE (while_var LESS 1000)
SET(while_var ${while_var}0)
ENDWHILE(while_var LESS 1000)
#
# Configure file
......
......@@ -656,6 +656,18 @@ int main()
}
#endif
// ----------------------------------------------------------------------
// Test WHILE
if(WHILE_VALUE != 1000)
{
cmFailed("WHILE command is not working");
}
else
{
cmPassed("WHILE command is working");
}
// ----------------------------------------------------------------------
// Test FIND_FILE, FIND_PATH and various GET_FILENAME_COMPONENT combinations
......
......@@ -12,6 +12,9 @@
#define FOREACH_VAR2 "${FOREACH_VAR2}"
#define FOREACH_CONCAT "${FOREACH_CONCAT}"
// Test WHILE
#define WHILE_VALUE ${while_var}
// Test FIND_FILE, FIND_PATH and various GET_FILENAME_COMPONENT combinations
#define FILENAME_VAR_PATH_NAME "${FILENAME_VAR_PATH_NAME}"
......
......@@ -237,6 +237,11 @@ FOREACH(x "a")
ENDIF(${x} MATCHES "a")
ENDFOREACH(x)
# test WHILE command
SET (while_var 1)
WHILE (while_var LESS 1000)
SET(while_var ${while_var}0)
ENDWHILE(while_var LESS 1000)
#
# Configure file
......
......@@ -656,6 +656,18 @@ int main()
}
#endif
// ----------------------------------------------------------------------
// Test WHILE
if(WHILE_VALUE != 1000)
{
cmFailed("WHILE command is not working");
}
else
{
cmPassed("WHILE command is working");
}
// ----------------------------------------------------------------------
// Test FIND_FILE, FIND_PATH and various GET_FILENAME_COMPONENT combinations
......
......@@ -12,6 +12,9 @@
#define FOREACH_VAR2 "${FOREACH_VAR2}"
#define FOREACH_CONCAT "${FOREACH_CONCAT}"
// Test WHILE
#define WHILE_VALUE ${while_var}
// Test FIND_FILE, FIND_PATH and various GET_FILENAME_COMPONENT combinations
#define FILENAME_VAR_PATH_NAME "${FILENAME_VAR_PATH_NAME}"
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment