Debian Codegraph @

test cases/common/234 get_file_contents/meson.build

raw
1 project(
2 'meson-fs-read-file',
3 [],
4 version: files('VERSION')
5 )
6 fs = import('fs')
7
8 assert(fs.read('VERSION').strip() == meson.project_version(), 'file misread')
9
10 expected = (
11 '∮ E⋅da = Q, n → ∞, ∑ f(i) = ∏ g(i), ∀x∈ℝ: ⌈x⌉ = −⌊−x⌋, α ∧ ¬β = ¬(¬α ∨ β)'
12 )
13 assert(
14 fs.read('utf-16-text', encoding: 'utf-16').strip() == expected,
15 'file was not decoded correctly'
16 )
17
18 # Make sure we handle `files()` objects properly, too
19 version_file = files('VERSION')
20
21 subdir('other')