CMake/Tests/RunCMake/ExternalData
Brad King 1823ab4d76 ExternalData: Preserve escaped semicolons during argument expansion
The CMake language implicitly flattens lists so a ";" in a list element
must be escaped with a backslash.  List expansion removes backslashes
escaping semicolons to leave raw semicolons in the values.  Teach
ExternalData_Add_Test and ExternalData_Expand_Arguments to re-escape
semicolons found in list elements so the resulting argument lists work
as if constructed directly by the set() command.

For example:

  ExternalData_Add_Test(Data NAME test1 COMMAND ... "a\\;b")
  ExternalData_Expand_Arguments(Data args2 "c\\;d")
  add_test(NAME test2 COMMAND ... ${args2})

should be equivalent to

  set(args1 "a\\;b")
  add_test(NAME test1 COMMAND ... ${args1})
  set(args2 "c\\;d")
  add_test(NAME test2 COMMAND ... ${args2})

which is equivalent to

  add_test(NAME test1 COMMAND ... "a;b")
  add_test(NAME test2 COMMAND ... "c;d")

Note that it is not possible to make ExternalData_Add_Test act exactly
like add_test when quoted arguments contain semicolons because the CMake
language flattens lists when constructing function ARGN values.  This
re-escape approach at least allows test arguments to have semicolons.

While at it, teach ExternalData APIs to not transform "DATA{...;...}"
arguments because the contained semicolons are non-sensical.

Suggested-by: Jean-Christophe Fillion-Robin <jchris.fillionr@kitware.com>
2013-03-12 16:33:19 -04:00
..
Directory1 ExternalData: Add tests covering interfaces and errors 2013-01-30 10:04:54 -05:00
Directory2 ExternalData: Add tests covering interfaces and errors 2013-01-30 10:04:54 -05:00
Directory3 ExternalData: Add tests covering interfaces and errors 2013-01-30 10:04:54 -05:00
Directory4 ExternalData: Allow DATA{} syntax to reference directories 2013-01-30 10:05:07 -05:00
SubDirectory1 ExternalData: Collapse ../ components in DATA{} paths 2013-01-30 14:55:12 -05:00
BadHashAlgo1-result.txt ExternalData: Add tests covering interfaces and errors 2013-01-30 10:04:54 -05:00
BadHashAlgo1-stderr.txt ExternalData: Add tests covering interfaces and errors 2013-01-30 10:04:54 -05:00
BadHashAlgo1.cmake ExternalData: Add tests covering interfaces and errors 2013-01-30 10:04:54 -05:00
BadHashAlgo1.txt ExternalData: Add tests covering interfaces and errors 2013-01-30 10:04:54 -05:00
BadOption1-result.txt ExternalData: Add tests covering interfaces and errors 2013-01-30 10:04:54 -05:00
BadOption1-stderr.txt ExternalData: Add tests covering interfaces and errors 2013-01-30 10:04:54 -05:00
BadOption1.cmake ExternalData: Add tests covering interfaces and errors 2013-01-30 10:04:54 -05:00
BadOption2-result.txt ExternalData: Add tests covering interfaces and errors 2013-01-30 10:04:54 -05:00
BadOption2-stderr.txt ExternalData: Add tests covering interfaces and errors 2013-01-30 10:04:54 -05:00
BadOption2.cmake ExternalData: Add tests covering interfaces and errors 2013-01-30 10:04:54 -05:00
BadSeries1-result.txt ExternalData: Add tests covering interfaces and errors 2013-01-30 10:04:54 -05:00
BadSeries1-stderr.txt ExternalData: Add tests covering interfaces and errors 2013-01-30 10:04:54 -05:00
BadSeries1.cmake ExternalData: Add tests covering interfaces and errors 2013-01-30 10:04:54 -05:00
BadSeries2-result.txt ExternalData: Add tests covering interfaces and errors 2013-01-30 10:04:54 -05:00
BadSeries2-stderr.txt ExternalData: Add tests covering interfaces and errors 2013-01-30 10:04:54 -05:00
BadSeries2.cmake ExternalData: Add tests covering interfaces and errors 2013-01-30 10:04:54 -05:00
BadSeries3-result.txt ExternalData: Add tests covering interfaces and errors 2013-01-30 10:04:54 -05:00
BadSeries3-stderr.txt ExternalData: Add tests covering interfaces and errors 2013-01-30 10:04:54 -05:00
BadSeries3.cmake ExternalData: Add tests covering interfaces and errors 2013-01-30 10:04:54 -05:00
CMakeLists.txt ExternalData: Add tests covering interfaces and errors 2013-01-30 10:04:54 -05:00
Data.txt.md5 ExternalData: Add tests covering interfaces and errors 2013-01-30 10:04:54 -05:00
Directory1-result.txt ExternalData: Add tests covering interfaces and errors 2013-01-30 10:04:54 -05:00
Directory1-stderr.txt ExternalData: Add tests covering interfaces and errors 2013-01-30 10:04:54 -05:00
Directory1.cmake ExternalData: Add tests covering interfaces and errors 2013-01-30 10:04:54 -05:00
Directory2-result.txt ExternalData: Add tests covering interfaces and errors 2013-01-30 10:04:54 -05:00
Directory2-stderr.txt ExternalData: Allow DATA{} syntax to reference directories 2013-01-30 10:05:07 -05:00
Directory2.cmake ExternalData: Add tests covering interfaces and errors 2013-01-30 10:04:54 -05:00
Directory2.md5 ExternalData: Add tests covering interfaces and errors 2013-01-30 10:04:54 -05:00
Directory3-result.txt ExternalData: Add tests covering interfaces and errors 2013-01-30 10:04:54 -05:00
Directory3-stderr.txt ExternalData: Add tests covering interfaces and errors 2013-01-30 10:04:54 -05:00
Directory3.cmake ExternalData: Add tests covering interfaces and errors 2013-01-30 10:04:54 -05:00
Directory4-result.txt ExternalData: Allow DATA{} syntax to reference directories 2013-01-30 10:05:07 -05:00
Directory4-stderr.txt ExternalData: Allow DATA{} syntax to reference directories 2013-01-30 10:05:07 -05:00
Directory4.cmake ExternalData: Allow DATA{} syntax to reference directories 2013-01-30 10:05:07 -05:00
Directory5-result.txt ExternalData: Allow DATA{} syntax to reference directories 2013-01-30 10:05:07 -05:00
Directory5-stderr.txt ExternalData: Allow DATA{} syntax to reference directories 2013-01-30 10:05:07 -05:00
Directory5.cmake ExternalData: Allow DATA{} syntax to reference directories 2013-01-30 10:05:07 -05:00
LinkContentMD5-stdout.txt ExternalData: Add tests covering interfaces and errors 2013-01-30 10:04:54 -05:00
LinkContentMD5.cmake ExternalData: Add tests covering interfaces and errors 2013-01-30 10:04:54 -05:00
LinkContentSHA1-stdout.txt ExternalData: Add support for SHA 1 and 2 hash algorithms 2013-01-30 10:05:07 -05:00
LinkContentSHA1.cmake ExternalData: Add support for SHA 1 and 2 hash algorithms 2013-01-30 10:05:07 -05:00
MissingData-result.txt ExternalData: Add tests covering interfaces and errors 2013-01-30 10:04:54 -05:00
MissingData-stderr.txt ExternalData: Add tests covering interfaces and errors 2013-01-30 10:04:54 -05:00
MissingData.cmake ExternalData: Add tests covering interfaces and errors 2013-01-30 10:04:54 -05:00
NoLinkInSource-stderr.txt ExternalData: Add tests covering interfaces and errors 2013-01-30 10:04:54 -05:00
NoLinkInSource-stdout.txt ExternalData: Add tests covering interfaces and errors 2013-01-30 10:04:54 -05:00
NoLinkInSource.cmake ExternalData: Add tests covering interfaces and errors 2013-01-30 10:04:54 -05:00
NoURLTemplates-result.txt ExternalData: Add tests covering interfaces and errors 2013-01-30 10:04:54 -05:00
NoURLTemplates-stderr.txt ExternalData: Add tests covering interfaces and errors 2013-01-30 10:04:54 -05:00
NoURLTemplates.cmake ExternalData: Add tests covering interfaces and errors 2013-01-30 10:04:54 -05:00
NormalData1-stdout.txt ExternalData: Add tests covering interfaces and errors 2013-01-30 10:04:54 -05:00
NormalData1.cmake ExternalData: Add tests covering interfaces and errors 2013-01-30 10:04:54 -05:00
NormalData2-stdout.txt ExternalData: Add tests covering interfaces and errors 2013-01-30 10:04:54 -05:00
NormalData2.cmake ExternalData: Add tests covering interfaces and errors 2013-01-30 10:04:54 -05:00
NormalData3-stdout.txt ExternalData: Add tests covering interfaces and errors 2013-01-30 10:04:54 -05:00
NormalData3.cmake ExternalData: Add tests covering interfaces and errors 2013-01-30 10:04:54 -05:00
NormalDataSub1-stdout.txt ExternalData: Add tests covering interfaces and errors 2013-01-30 10:04:54 -05:00
NormalDataSub1.cmake ExternalData: Add tests covering interfaces and errors 2013-01-30 10:04:54 -05:00
NotUnderRoot-result.txt ExternalData: Add tests covering interfaces and errors 2013-01-30 10:04:54 -05:00
NotUnderRoot-stderr.txt ExternalData: Add tests covering interfaces and errors 2013-01-30 10:04:54 -05:00
NotUnderRoot.cmake ExternalData: Add tests covering interfaces and errors 2013-01-30 10:04:54 -05:00
RunCMakeTest.cmake ExternalData: Preserve escaped semicolons during argument expansion 2013-03-12 16:33:19 -04:00
Semicolon1-stdout.txt ExternalData: Preserve escaped semicolons during argument expansion 2013-03-12 16:33:19 -04:00
Semicolon1.cmake ExternalData: Preserve escaped semicolons during argument expansion 2013-03-12 16:33:19 -04:00
Semicolon2-stdout.txt ExternalData: Preserve escaped semicolons during argument expansion 2013-03-12 16:33:19 -04:00
Semicolon2.cmake ExternalData: Preserve escaped semicolons during argument expansion 2013-03-12 16:33:19 -04:00
Semicolon3-stdout.txt ExternalData: Preserve escaped semicolons during argument expansion 2013-03-12 16:33:19 -04:00
Semicolon3.cmake ExternalData: Preserve escaped semicolons during argument expansion 2013-03-12 16:33:19 -04:00
SubDirectory1-stdout.txt ExternalData: Collapse ../ components in DATA{} paths 2013-01-30 14:55:12 -05:00
SubDirectory1.cmake ExternalData: Add tests covering interfaces and errors 2013-01-30 10:04:54 -05:00