multi_input_with_output.carbon 1.1 KB

12345678910111213141516171819202122
  1. // Part of the Carbon Language project, under the Apache License v2.0 with LLVM
  2. // Exceptions. See /LICENSE for license information.
  3. // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
  4. //
  5. // Exclude the prelude import so that the number of prelude files isn't tested.
  6. // ARGS: --include-diagnostic-kind compile --output=%t --no-prelude-import foo.carbon bar.carbon
  7. //
  8. // SET-CAPTURE-CONSOLE-OUTPUT
  9. // clang-format off
  10. // AUTOUPDATE
  11. // TIP: To test this file alone, run:
  12. // TIP: bazel test //toolchain/testing:file_test --test_arg=--file_tests=toolchain/driver/testdata/multi_input_with_output.carbon
  13. // TIP: To dump output, run:
  14. // TIP: bazel run //toolchain/testing:file_test -- --dump_output --file_tests=toolchain/driver/testdata/multi_input_with_output.carbon
  15. // CHECK:STDERR: warning: only outputting bar.carbon to {{.+}}/temp_file, skipping output of 1 input file; pass `--output-last-input-only` to silence this warning [CompileMultipleInputsWithOutput]
  16. // CHECK:STDERR:
  17. // --- foo.carbon
  18. library "[[@TEST_NAME]]";
  19. // --- bar.carbon
  20. library "[[@TEST_NAME]]";