summaryrefslogtreecommitdiff
path: root/test cases/common/35 string operations/meson.build
AgeCommit message (Collapse)Author
2025-11-14add test cases for meson.version.version_compare()Eli Schwartz
Extracted from https://github.com/mesonbuild/meson/pull/15230 Co-authored-by: Charlie Hutcheson <chaz.hutcheson@gmail.com>
2025-01-27allow to compare multiple version with version_compareCharles Brunet
2023-06-20add str.splitlines methodMartin Dørum
The new splitlines method on str is intended to replace usage of fs.read('whatever').strip().split('\n'). The problem with the .strip().split() approach is that it doesn't have a way to represent empty lists (an empty string becomes a list with one empty string, not an empty list), and it doesn't handle Windows-style line endings.
2022-08-23tests: remove compiler requirement in various unneeded casesEli Schwartz
Compiled languages are Meson's bread and butter, but hardly required. This is convenient, because many test caases specifically, do not care about testing the compiler interactions. In such cases, we can skip doing compiler lookups which aren't used, as they only slow down test setup.
2021-11-04fix regression that broke string.format with list objectsEli Schwartz
String formatting should validly assume that printing a list means printing the list itself. Instead, something like this broke: 'one is: @0@ and two is: @1@'.format(['foo', 'bar'], ['baz']) which would evaluate as: 'one is: foo and two is: bar' or: 'the value of array option foobar is: @0@'.format(get_option('foobar')) which should evaluate with '-Dfoobar=[]' as 'the value of array option foobar is: []' But instead produced: meson.build:7:0: ERROR: Format placeholder @0@ out of range. Fixes #9530
2021-10-10Revert "interpreter: Add FeatureNew check"Eli Schwartz
This reverts commit c0efa7ab22f8900f6fa1dadf0d306ec375569c8d. This was a nice idea, or a beautiful hack depending on your perspective. Unfortunately, it turns out to be a lot harder than we originally thought. By operating on bare nodes, we end up triggering a FeatureNew on anything that isn't a string literal, rather than anything that isn't a string. Since no one else has come up with a better idea for implementing a FeatureNew, let's just revert it. Better to not have a warning, than have it trigger way too often.
2021-09-25interpreter: Add FeatureNew checkDaniel Mensinger
2021-09-25Remove helpers.check_stringlist()Daniel Mensinger
2021-09-25interpreter: Introduce StringHolderDaniel Mensinger
Another commit in my quest to rid InterpreterBase from all higher level object processing logic. Additionally, there is a a logic change here, since `str.join` now uses varargs and can now accept more than one argument (and supports list flattening).
2021-04-26Condense test directory names.Jussi Pakkanen