diff options
| author | Charles Brunet <charles.brunet@optelgroup.com> | 2024-06-26 10:44:46 -0400 |
|---|---|---|
| committer | Eli Schwartz <eschwartz93@gmail.com> | 2024-06-26 15:44:49 -0400 |
| commit | dbfd3e8c41b96d40511f9a683d9718e2aca32275 (patch) | |
| tree | e581a6e7be4db083a95559e1c7d783ed9ef52a9f /test cases | |
| parent | d2e7250433e561725ff82b167739de903ca17a0f (diff) | |
| download | meson-dbfd3e8c41b96d40511f9a683d9718e2aca32275.tar.gz | |
format: fix edge case with empty functions
format was adding a new empty line each time when trying to split a long line containing a function with no arguments
Diffstat (limited to 'test cases')
| -rw-r--r-- | test cases/format/1 default/gh13242.meson | 4 | ||||
| -rw-r--r-- | test cases/format/1 default/meson.build | 3 |
2 files changed, 4 insertions, 3 deletions
diff --git a/test cases/format/1 default/gh13242.meson b/test cases/format/1 default/gh13242.meson index b9122ec81..67f7dd1bb 100644 --- a/test cases/format/1 default/gh13242.meson +++ b/test cases/format/1 default/gh13242.meson @@ -10,9 +10,7 @@ test( ) test( - should_fail: (settings.get('x', false) and not settings['y'] and dep.version( - - ).version_compare( + should_fail: (settings.get('x', false) and not settings['y'] and dep.version().version_compare( '>=1.2.3', )), ) diff --git a/test cases/format/1 default/meson.build b/test cases/format/1 default/meson.build index 35e5b9694..83ae19aa0 100644 --- a/test cases/format/1 default/meson.build +++ b/test cases/format/1 default/meson.build @@ -10,6 +10,9 @@ meson_files = { 'gh13242': files('gh13242.meson'), } +# Ensure empty function are formatted correctly on long lines +a = '@0@@1@@2@@3@@4@'.format('one', 'two', 'three', 'four', 'five').strip().strip() + foreach name, f : meson_files test(name, meson_cmd, args: ['format', '--check-only', f]) endforeach |
