ENH: added testing of the WHILE command

This commit is contained in:
Ken Martin 2005-06-30 13:39:38 -04:00
parent 8ea0a1a237
commit ba3b7c1588
9 changed files with 60 additions and 0 deletions

View File

@ -237,6 +237,11 @@ FOREACH(x "a")
ENDIF(${x} MATCHES "a") ENDIF(${x} MATCHES "a")
ENDFOREACH(x) 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 # Configure file

View File

@ -656,6 +656,18 @@ int main()
} }
#endif #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 // Test FIND_FILE, FIND_PATH and various GET_FILENAME_COMPONENT combinations

View File

@ -12,6 +12,9 @@
#define FOREACH_VAR2 "${FOREACH_VAR2}" #define FOREACH_VAR2 "${FOREACH_VAR2}"
#define FOREACH_CONCAT "${FOREACH_CONCAT}" #define FOREACH_CONCAT "${FOREACH_CONCAT}"
// Test WHILE
#define WHILE_VALUE ${while_var}
// Test FIND_FILE, FIND_PATH and various GET_FILENAME_COMPONENT combinations // Test FIND_FILE, FIND_PATH and various GET_FILENAME_COMPONENT combinations
#define FILENAME_VAR_PATH_NAME "${FILENAME_VAR_PATH_NAME}" #define FILENAME_VAR_PATH_NAME "${FILENAME_VAR_PATH_NAME}"

View File

@ -237,6 +237,11 @@ FOREACH(x "a")
ENDIF(${x} MATCHES "a") ENDIF(${x} MATCHES "a")
ENDFOREACH(x) 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 # Configure file

View File

@ -656,6 +656,18 @@ int main()
} }
#endif #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 // Test FIND_FILE, FIND_PATH and various GET_FILENAME_COMPONENT combinations

View File

@ -12,6 +12,9 @@
#define FOREACH_VAR2 "${FOREACH_VAR2}" #define FOREACH_VAR2 "${FOREACH_VAR2}"
#define FOREACH_CONCAT "${FOREACH_CONCAT}" #define FOREACH_CONCAT "${FOREACH_CONCAT}"
// Test WHILE
#define WHILE_VALUE ${while_var}
// Test FIND_FILE, FIND_PATH and various GET_FILENAME_COMPONENT combinations // Test FIND_FILE, FIND_PATH and various GET_FILENAME_COMPONENT combinations
#define FILENAME_VAR_PATH_NAME "${FILENAME_VAR_PATH_NAME}" #define FILENAME_VAR_PATH_NAME "${FILENAME_VAR_PATH_NAME}"

View File

@ -237,6 +237,11 @@ FOREACH(x "a")
ENDIF(${x} MATCHES "a") ENDIF(${x} MATCHES "a")
ENDFOREACH(x) 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 # Configure file

View File

@ -656,6 +656,18 @@ int main()
} }
#endif #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 // Test FIND_FILE, FIND_PATH and various GET_FILENAME_COMPONENT combinations

View File

@ -12,6 +12,9 @@
#define FOREACH_VAR2 "${FOREACH_VAR2}" #define FOREACH_VAR2 "${FOREACH_VAR2}"
#define FOREACH_CONCAT "${FOREACH_CONCAT}" #define FOREACH_CONCAT "${FOREACH_CONCAT}"
// Test WHILE
#define WHILE_VALUE ${while_var}
// Test FIND_FILE, FIND_PATH and various GET_FILENAME_COMPONENT combinations // Test FIND_FILE, FIND_PATH and various GET_FILENAME_COMPONENT combinations
#define FILENAME_VAR_PATH_NAME "${FILENAME_VAR_PATH_NAME}" #define FILENAME_VAR_PATH_NAME "${FILENAME_VAR_PATH_NAME}"