mirror of
https://github.com/carbon-language/carbon-lang.git
synced 2026-11-22 10:42:38 +00:00
This removes some churn when adding new diagnostic cases to test files (where previous to this change the newly added newline would cause the previous diagnostic CHECKs to be updated including changes to the line number because the CHECK for the blank line meant an extra line between CHECK and source line). A few alternatives discussed here: https://discord.com/channels/655572317891461132/655578254970716160/1329573358475673723 --------- Co-authored-by: Jon Ross-Perkins <jperkins@google.com>
99 lines
4.7 KiB
Plaintext
99 lines
4.7 KiB
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
|
|
//
|
|
// AUTOUPDATE
|
|
// TIP: To test this file alone, run:
|
|
// TIP: bazel test //toolchain/testing:file_test --test_arg=--file_tests=toolchain/lex/testdata/string_literals.carbon
|
|
// TIP: To dump output, run:
|
|
// TIP: bazel run //toolchain/testing:file_test -- --dump_output --file_tests=toolchain/lex/testdata/string_literals.carbon
|
|
|
|
// --- fail_decimal_escape.carbon
|
|
// CHECK:STDOUT: - filename: fail_decimal_escape.carbon
|
|
// CHECK:STDOUT: tokens:
|
|
|
|
// CHECK:STDERR: fail_decimal_escape.carbon:[[@LINE+4]]:4: error: decimal digit follows `\0` escape sequence. Use `\x00` instead of `\0` if the next character is a digit [DecimalEscapeSequence]
|
|
// CHECK:STDERR: "\01"
|
|
// CHECK:STDERR: ^
|
|
// CHECK:STDERR:
|
|
"\01"
|
|
// CHECK:STDOUT: - { index: 1, kind: 'StringLiteral', line: {{ *}}[[@LINE-1]], column: 1, indent: 1, spelling: '"\01"', value: ` |