diff options
author | 2023-10-10 14:33:42 +0000 | |
---|---|---|
committer | 2023-10-10 14:33:42 +0000 | |
commit | af1a266670d040d2f4083ff309d732d648afba2a (patch) | |
tree | 2fc46203448ddcc6f81546d379abfaeb323575e9 /meson/test cases/common/56 array methods/meson.build | |
parent | e02cda008591317b1625707ff8e115a4841aa889 (diff) |
Change-Id: Iaf8d18082d3991dec7c0ebbea540f092188eb4ec
Diffstat (limited to 'meson/test cases/common/56 array methods/meson.build')
-rw-r--r-- | meson/test cases/common/56 array methods/meson.build | 70 |
1 files changed, 70 insertions, 0 deletions
diff --git a/meson/test cases/common/56 array methods/meson.build b/meson/test cases/common/56 array methods/meson.build new file mode 100644 index 000000000..99855bce0 --- /dev/null +++ b/meson/test cases/common/56 array methods/meson.build @@ -0,0 +1,70 @@ +project('array methods', 'c') + +empty = [] +one = ['abc'] +two = ['def', 'ghi'] +combined = [empty, one, two] + +file_list = files('a.txt', 'b.txt') +file_a = files('a.txt') +file_c = files('c.txt') + +if file_a[0] != file_list[0] + error('Files are not equal') +endif + +if not file_list.contains(file_a[0]) + error('Contains with ObjectHolder lists does not work') +endif + +if file_list.contains(file_c[0]) + error('Contains with ObjectHolder lists found non existant object') +endif + +if empty.contains('abc') + error('Empty is not empty.') +endif + +if one.contains('a') + error('One claims to contain a') +endif + +if not one.contains('abc') + error('One claims to not contain abc.') +endif + +if one.contains('abcd') + error('One claims to contain abcd.') +endif + +if two.contains('abc') + error('Two claims to contain abc.') +endif + +if not two.contains('def') + error('Two claims not to contain def.') +endif + +if not two.contains('ghi') + error('Two claims not to contain ghi.') +endif + +if two.contains('defg') + error('Two claims to contain defg.') +endif + +if not combined.contains('abc') + error('Combined claims not to contain abc.') +endif + +if not combined.contains(one) + error('Combined claims not to contain [abc].') +endif + +if not combined.contains(two) + error('Combined claims not to contain [def, ghi].') +endif + +if not combined.contains('ghi') + error('Combined claims not to contain ghi.') +endif |