Update spec tests to current version from message-format-wg
- Update parser for changed name-start grammar rule
- Validate number literals in :number implementation (since parser no longer does this)
- Disallow `:number`/`:integer` select option set from variable
See https://github.com/unicode-org/message-format-wg/pull/1016
As part of this, un-skip tests where the `bad-option` error is
expected, and implement validating digit size options
(pending PR https://github.com/unicode-org/icu/pull/2973 is intended
to do this more fully)
The tool pkgdata uses snprintf() to build the strings of the commands that
will execute later during the install process. But the maximum size of this
buffers is not enough when there is a long path.
This has caused issues on some CI systems that use very long paths, causing
the install process to produce a wrong result.
The maximum path on Linux is 4096 (defined as PATH_MAX at <linux/limits.h>)
So the size of SMALL_BUFFER_MAX_SIZE should be 4096 to avoid errors related
to truncated paths.
This change moves all test strings out of test/intltest/messageformat2test.cpp
and into JSON files, which are parsed/run by code in
a new file, test/intltest/messageformat2test_read_json.cpp .
It also removes the file test/intltest/messageformat2test_fromjson.cpp ,
which contained tests that are now stored in JSON files.
To enable this, a new vendored library is added:
nlohmann/json .
This library is introduced as a dependency for the MF2 tests.
The required part of the library is a single header file,
which is added under icu4c/source/tools/toolutil/.
Also adds a wrapper file for the vendored JSON header file
that defines macros that disable exceptions.
Co-authored-by: Steven R. Loomis <srl295@gmail.com>
An attempt to build ICU on old macOS with PowerPC leads to an issue:
```
./out/tmp/icudt72b_dat.S:7:Unknown pseudo-op: .balign
./out/tmp/icudt72b_dat.S:7:Rest of line ignored. 1st junk character valued 49 (1).
```
Why? Because `as` is too old.
Anyway, switch back to `.p2align` fix a build and allows to pass all tests.
See: https://trac.macports.org/ticket/66258
Signed-off-by: Kirill A. Korinsky <kirill@korins.ky>
This is the normal standard way in C, C++ as well as Java and there's no
longer any reason for ICU to be different. The various internal macros
providing custom boolean constants can all be deleted and code as well
as documentation can be updated to use lowercase true/false everywhere.
This is the next installment of UVector error handling cleanup. It includes:
- Revise UStack to follow the conventions of UVector, to leave the stack
unmodified when there is an incoming error code. And, for stacks with a
deleter function, to delete the incoming object if it cannot be
succesfully pushed.
- Review all useage of UStack in ICU; adjust call sites as needed.
- Review all uses of UVector::addElementX() in the implementation of
- Regular Expressions
- Break Iteration
- toolutil/xmlparser
changing to the updated functions, and adjusting call sites as needed.
- 7 new properties: API constants & property names
- u_stringHasBinaryProperty(s, property) & UCharacter.hasBinaryProperty(s, property)
- two additional source data files
- new genprops part for writing new binary data file uemoji.icu
- data for existing emoji properties moved from uprops.icu (hardcoded in C++) to uemoji.icu (always loaded)
- new EmojiProps implementation
This is the first step towards improving the error handling and out-of-memory
behavior of UVector::addElement(). A followup PR will add back a new addElement()
with corrected error handling, then additional followups will switch call sites
from the original (renamed) function to the new addElement().
This commit includes no logic or behavior changes; it only renames the existing functions.