ICU-21762 Export Script_Extensions with --all flag in icuexportdata

See #2054
This commit is contained in:
Shane Carr 2022-03-28 20:58:10 +00:00 committed by Shane F. Carr
parent 2612b8b55a
commit b144aac447
2 changed files with 15 additions and 5 deletions

View file

@ -604,8 +604,8 @@ jobs:
mkdir -p icu4c/source/icuexportdata_uprops_full/fast
mkdir -p icu4c/source/icuexportdata_uprops_full/small
cd icu4c/source
LD_LIBRARY_PATH=lib ./bin/icuexportdata --mode uprops --index --copyright --destdir icuexportdata_uprops_full/fast --trie-type fast --all
LD_LIBRARY_PATH=lib ./bin/icuexportdata --mode uprops --index --copyright --destdir icuexportdata_uprops_full/small --trie-type small --all
LD_LIBRARY_PATH=lib ./bin/icuexportdata --mode uprops --index --copyright --verbose --destdir icuexportdata_uprops_full/fast --trie-type fast --all
LD_LIBRARY_PATH=lib ./bin/icuexportdata --mode uprops --index --copyright --verbose --destdir icuexportdata_uprops_full/small --trie-type small --all
displayName: 'Build Unicode property data export file (Full)'
# In the sample file, include:
# - Basic binary properties: AHex WSpace
@ -616,8 +616,8 @@ jobs:
mkdir -p icu4c/source/icuexportdata_uprops_sample/fast
mkdir -p icu4c/source/icuexportdata_uprops_sample/small
cd icu4c/source
LD_LIBRARY_PATH=lib ./bin/icuexportdata --mode uprops --index --copyright --destdir icuexportdata_uprops_sample/fast --trie-type fast AHex gc nt Basic_Emoji sc WSpace blank
LD_LIBRARY_PATH=lib ./bin/icuexportdata --mode uprops --index --copyright --destdir icuexportdata_uprops_sample/small --trie-type small AHex gc nt Basic_Emoji sc WSpace blank
LD_LIBRARY_PATH=lib ./bin/icuexportdata --mode uprops --index --copyright --verbose --destdir icuexportdata_uprops_sample/fast --trie-type fast AHex gc nt Basic_Emoji sc WSpace blank
LD_LIBRARY_PATH=lib ./bin/icuexportdata --mode uprops --index --copyright --verbose --destdir icuexportdata_uprops_sample/small --trie-type small AHex gc nt Basic_Emoji sc WSpace blank
displayName: 'Build Unicode property data export file (Sample)'
- task: PublishBuildArtifacts@1
displayName: 'Publish Artifact: icuexportdata_uprops_full'

View file

@ -359,10 +359,17 @@ int exportUprops(int argc, char* argv[]) {
propNames.push_back(argv[i]);
}
if (options[OPT_ALL].doesOccur) {
for (int i=UCHAR_BINARY_START; i<UCHAR_INT_LIMIT; i++) {
int i = UCHAR_BINARY_START;
while (true) {
if (i == UCHAR_BINARY_LIMIT) {
i = UCHAR_INT_START;
}
if (i == UCHAR_INT_LIMIT) {
i = UCHAR_SCRIPT_EXTENSIONS;
}
if (i == UCHAR_SCRIPT_EXTENSIONS + 1) {
break;
}
UProperty uprop = static_cast<UProperty>(i);
const char* propName = u_getPropertyName(uprop, U_SHORT_PROPERTY_NAME);
if (propName == NULL) {
@ -373,7 +380,10 @@ int exportUprops(int argc, char* argv[]) {
}
if (propName != NULL) {
propNames.push_back(propName);
} else {
std::cerr << "Warning: Could not find name for: " << uprop << std::endl;
}
i++;
}
}