mirror of
https://github.com/carbon-language/carbon-lang.git
synced 2026-10-05 22:02:55 +01:00
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.
This commit is contained in:
+19
@@ -0,0 +1,19 @@
|
||||
// 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`
|
||||
Reference in New Issue
Block a user