Files
carbon-lang/testing/file_test/testdata/escaping.carbon
T
Jon Ross-Perkins aec951d7c3 Fix autoupdate handling of carriage return (#4840)
Switching from RE2 to StrReplaceAll because it seems a fair fit for what
actually needs to be done here. Also pick up \t for visibility reasons.

This came up because clangd's LSP-related APIs print carriage returns.
2025-01-24 16:41:57 +00:00

20 lines
883 B
Plaintext

// Part of the Carbon Language project, under the Apache License v2.0 with LLVM
// Exceptions. See /LICENSE for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
// SET-CAPTURE-CONSOLE-OUTPUT
// AUTOUPDATE
// TIP: To test this file alone, run:
// TIP: bazel test //testing/file_test:file_test_base_test --test_arg=--file_tests=testing/file_test/testdata/escaping.carbon
// TIP: To dump output, run:
// TIP: bazel run //testing/file_test:file_test_base_test -- --dump_output --file_tests=testing/file_test/testdata/escaping.carbon
// CHECK:STDERR: carriage return{{\r}}
// CHECK:STDERR: {one brace}
// CHECK:STDERR: {{\{\{}}two braces}}
// CHECK:STDERR: [one bracket]
// CHECK:STDERR: {{\[\[}}two brackets]]
// CHECK:STDERR: end of line whitespace {{}}
// CHECK:STDERR: {{\t}}tabs{{\t}}
// CHECK:STDOUT: 2 args: `default_args`, `escaping.carbon`