mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-11-09 18:31:04 +00:00
Cmake export tests: Correct some mistakes in commit 4138ab7
This commit is contained in:
parent
695399b062
commit
df22dfdf6b
@ -173,40 +173,42 @@ macro(loadTestList filename resList)
|
||||
set(${resList})
|
||||
set(sublabel)
|
||||
set(mylabels "")
|
||||
set(languages "")
|
||||
message(STATUS "Reading list ${filename}")
|
||||
foreach(_l ${tempList})
|
||||
set(_newl "${_l}")
|
||||
string(REGEX REPLACE "[ \t]*#.*$" "" _newl "${_l}")
|
||||
if(_newl)
|
||||
string(REGEX REPLACE "(\\/|\\||\\(|\\))" " " _vxx ${_newl})
|
||||
string(REGEX MATCHALL " ([a-z][a-z](_[A-Z][A-Z])?) " _vx ${_vxx})
|
||||
list(APPEND ${resList} "${_newl}")
|
||||
if (_newl MATCHES "^Sublabel:")
|
||||
string(REGEX REPLACE "^Sublabel:[ \t]*" "" _newlabels ${_newl})
|
||||
string(REGEX MATCHALL "([a-zA-Z]+)" _labels ${_newlabels})
|
||||
foreach(labname ${_labels})
|
||||
if (NOT labname STREQUAL "RESET")
|
||||
list(REMOVE_ITEM mylabels ${labname})
|
||||
list(APPEND mylabels ${labname})
|
||||
endif()
|
||||
endforeach()
|
||||
list(REMOVE_DUPLICATES mylabels)
|
||||
set(sublabel ${_newl})
|
||||
endif()
|
||||
if(_vx)
|
||||
foreach(_v ${_vx})
|
||||
string(REGEX REPLACE " " "" _v ${_v})
|
||||
#message(STATUS " ==> ${resList}_${_v}")
|
||||
if (NOT ${sublabel} STREQUAL "${sublabel}_${_v}")
|
||||
list(APPEND ${resList}_${_v} "${sublabel}")
|
||||
set(${sublabel}_${_v} "${sublabel}")
|
||||
endif()
|
||||
list(APPEND ${resList}_${_v} "${_newl}")
|
||||
endforeach()
|
||||
if(_newl MATCHES "\\(\\|")
|
||||
#message(STATUS " ==> ${resList}")
|
||||
list(APPEND ${resList} "${_newl}")
|
||||
endif()
|
||||
else()
|
||||
#message(STATUS " ==> ${resList}")
|
||||
list(APPEND ${resList} "${_newl}")
|
||||
string(REGEX REPLACE "(\\/|\\||\\(|\\))" " " _vxx ${_newl})
|
||||
string(REGEX MATCHALL " ([a-z][a-z](_[A-Z][A-Z])?) " _vx ${_vxx})
|
||||
if(_vx)
|
||||
foreach(_v ${_vx})
|
||||
string(REGEX REPLACE " " "" _v ${_v})
|
||||
#message(STATUS " ==> ${resList}_${_v}")
|
||||
#message(STATUS "sublabel = ${sublabel}, sublabel_${_v} = ${sublabel_${_v}}")
|
||||
if (NOT sublabel STREQUAL "${sublabel_${_v}}")
|
||||
list(APPEND ${resList}_${_v} "${sublabel}")
|
||||
set(sublabel_${_v} "${sublabel}")
|
||||
#message(STATUS "Setting variable sublabel_${_v} with \"${sublabel}\"")
|
||||
endif()
|
||||
list(APPEND ${resList}_${_v} "${_newl}")
|
||||
list(APPEND languages ${_v})
|
||||
endforeach()
|
||||
list(REMOVE_DUPLICATES languages)
|
||||
#message(STATUS "languages = ${languages}")
|
||||
endif()
|
||||
endif()
|
||||
endif()
|
||||
endforeach()
|
||||
@ -218,6 +220,11 @@ macro(loadTestList filename resList)
|
||||
list(APPEND known_labels ${_l})
|
||||
endif()
|
||||
endforeach()
|
||||
foreach(_lg ${languages})
|
||||
# reset label for each used language string at end of file
|
||||
#message(STATUS "Resetting variable sublabel_${_lg}, previously set to ${sublabel_${_lg}}")
|
||||
set(sublabel_${_lg} "")
|
||||
endforeach()
|
||||
endmacro()
|
||||
|
||||
loadTestList(revertedTests revertedTests)
|
||||
|
Loading…
Reference in New Issue
Block a user