mirror of
https://github.com/Kitware/CMake.git
synced 2026-01-04 04:40:56 -06:00
Tests: Fix get_filename_component PROGRAM test to use an executable
This commit is contained in:
@@ -85,12 +85,12 @@ check("PROGRAM with args output: args" "${test_program_args}" " arg1 arg2")
|
|||||||
get_filename_component(test_program_name " " PROGRAM)
|
get_filename_component(test_program_name " " PROGRAM)
|
||||||
check("PROGRAM with just a space" "${test_program_name}" "")
|
check("PROGRAM with just a space" "${test_program_name}" "")
|
||||||
|
|
||||||
get_filename_component(test_program_name "${CMAKE_CURRENT_LIST_FILE}" PROGRAM)
|
get_filename_component(test_program_name "${CMAKE_CURRENT_LIST_DIR}/KnownComponents.sh" PROGRAM)
|
||||||
check("PROGRAM specified explicitly without quoting" "${test_program_name}" "${CMAKE_CURRENT_LIST_FILE}")
|
check("PROGRAM specified explicitly without quoting" "${test_program_name}" "${CMAKE_CURRENT_LIST_DIR}/KnownComponents.sh")
|
||||||
|
|
||||||
get_filename_component(test_program_name "\"${CMAKE_CURRENT_LIST_FILE}\" arg1 arg2" PROGRAM
|
get_filename_component(test_program_name "\"${CMAKE_CURRENT_LIST_DIR}/KnownComponents.sh\" arg1 arg2" PROGRAM
|
||||||
PROGRAM_ARGS test_program_args)
|
PROGRAM_ARGS test_program_args)
|
||||||
check("PROGRAM specified explicitly with arguments: name" "${test_program_name}" "${CMAKE_CURRENT_LIST_FILE}")
|
check("PROGRAM specified explicitly with arguments: name" "${test_program_name}" "${CMAKE_CURRENT_LIST_DIR}/KnownComponents.sh")
|
||||||
check("PROGRAM specified explicitly with arguments: args" "${test_program_args}" " arg1 arg2")
|
check("PROGRAM specified explicitly with arguments: args" "${test_program_args}" " arg1 arg2")
|
||||||
|
|
||||||
list(APPEND non_cache_vars test_program_name)
|
list(APPEND non_cache_vars test_program_name)
|
||||||
|
|||||||
1
Tests/RunCMake/get_filename_component/KnownComponents.sh
Executable file
1
Tests/RunCMake/get_filename_component/KnownComponents.sh
Executable file
@@ -0,0 +1 @@
|
|||||||
|
#!/bin/sh
|
||||||
Reference in New Issue
Block a user