mirror of
https://github.com/carbon-language/carbon-lang.git
synced 2026-09-25 07:40:10 +01:00
One of the things that ClangRunnerTest is doing is capturing stderr/stdout because clang prints to it directly. This adds support for that to FileTest. I'm renaming the current `capture_output` field to `dump_output` because the name is ambiguous after this change, and the flag is already named `--dump_output`. It's still not great, but at least it's more distinct. Note ClangRunner still doesn't use the vfs; that still needs work. I'm just moving the NoArgs test over as a trivial test of the functionality.
15 lines
639 B
C++
15 lines
639 B
C++
// 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
|
|
//
|
|
// ARGS: clang --
|
|
//
|
|
// SET-CAPTURE-CONSOLE-OUTPUT
|
|
// clang-format off
|
|
// AUTOUPDATE
|
|
// TIP: To test this file alone, run:
|
|
// TIP: bazel test //toolchain/testing:file_test --test_arg=--file_tests=toolchain/driver/testdata/fail_clang_no_args.cpp
|
|
// TIP: To dump output, run:
|
|
// TIP: bazel run //toolchain/testing:file_test -- --dump_output --file_tests=toolchain/driver/testdata/fail_clang_no_args.cpp
|
|
// CHECK:STDERR: error: no input files
|