diff options
Diffstat (limited to 'v_windows/v/old/vlib/v/fmt/tests/concat_expr_expected.vv')
-rw-r--r-- | v_windows/v/old/vlib/v/fmt/tests/concat_expr_expected.vv | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/v_windows/v/old/vlib/v/fmt/tests/concat_expr_expected.vv b/v_windows/v/old/vlib/v/fmt/tests/concat_expr_expected.vv new file mode 100644 index 0000000..47d5872 --- /dev/null +++ b/v_windows/v/old/vlib/v/fmt/tests/concat_expr_expected.vv @@ -0,0 +1,24 @@ +fn concatenation_of_strings() { + _ := 'Simple' + 'Concat' + _ := 'Hello' + ' ' + 'World' + '!' + _ := 'There' + ' ' + 'so' + ' ' + 'many' + ' ' + 'words' + ' ' + 'they' + ' ' + "don't" + ' ' + + 'fit' + ' ' + 'in' + ' ' + 'one' + ' ' + 'line' +} + +fn concat_inside_ternary() { + { // This block is needed to force line wrapping + cline := if iline == pos.line_nr { + sline[..start_column] + color(kind, sline[start_column..end_column]) + + sline[end_column..] + } else { + sline + } + } +} + +fn concat_two_or_more_ternaries() { + x := if some_condition { 'very long string part' } else { 'def' } + + if y == 'asd' { 'qwe' } else { 'something else' } + var := if other_condition { 'concat three long ternary ifs' } else { 'def' } + + if true { 'shorter' } else { 'quite short' } + if true { 'small' } else { 'tiny' } +} |