-
Notifications
You must be signed in to change notification settings - Fork 1.5k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add support for testing with stdin (#4819)
In order to write language-server tests, we need some way to pass stdin input. This adds support for a split "// --- STDIN" which will be provided as a temp file for testing. Note this does more stdin -> input_stream style renaming, this is just bugging me more since I know shadowing works but it can be subtle to read, particularly since I'm now making direct use of stdin in a handful of spots.
- v0.0.0-0.nightly.2025.03.09
- v0.0.0-0.nightly.2025.03.08
- v0.0.0-0.nightly.2025.03.07
- v0.0.0-0.nightly.2025.03.06
- v0.0.0-0.nightly.2025.03.05
- v0.0.0-0.nightly.2025.03.04
- v0.0.0-0.nightly.2025.03.03
- v0.0.0-0.nightly.2025.03.02
- v0.0.0-0.nightly.2025.03.01
- v0.0.0-0.nightly.2025.02.28
- v0.0.0-0.nightly.2025.02.27
- v0.0.0-0.nightly.2025.02.26
- v0.0.0-0.nightly.2025.02.25
- v0.0.0-0.nightly.2025.02.24
- v0.0.0-0.nightly.2025.02.23
- v0.0.0-0.nightly.2025.02.22
- v0.0.0-0.nightly.2025.02.21
- v0.0.0-0.nightly.2025.02.20
- v0.0.0-0.nightly.2025.02.19
- v0.0.0-0.nightly.2025.02.18
- v0.0.0-0.nightly.2025.02.17
- v0.0.0-0.nightly.2025.02.16
- v0.0.0-0.nightly.2025.02.15
- v0.0.0-0.nightly.2025.02.14
- v0.0.0-0.nightly.2025.02.13
- v0.0.0-0.nightly.2025.02.12
- v0.0.0-0.nightly.2025.02.11
- v0.0.0-0.nightly.2025.02.10
- v0.0.0-0.nightly.2025.02.09
- v0.0.0-0.nightly.2025.02.08
- v0.0.0-0.nightly.2025.02.07
- v0.0.0-0.nightly.2025.02.06
- v0.0.0-0.nightly.2025.02.05
- v0.0.0-0.nightly.2025.02.04
- v0.0.0-0.nightly.2025.02.03
- v0.0.0-0.nightly.2025.02.02
- v0.0.0-0.nightly.2025.02.01
- v0.0.0-0.nightly.2025.01.31
- v0.0.0-0.nightly.2025.01.30
- v0.0.0-0.nightly.2025.01.29
- v0.0.0-0.nightly.2025.01.28
- v0.0.0-0.nightly.2025.01.27
- v0.0.0-0.nightly.2025.01.26
- v0.0.0-0.nightly.2025.01.25
- v0.0.0-0.nightly.2025.01.24
- v0.0.0-0.nightly.2025.01.23
- v0.0.0-0.nightly.2025.01.22
Showing
9 changed files
with
225 additions
and
136 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
// 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 //testing/file_test:file_test_base_test --test_arg=--file_tests=testing/file_test/testdata/stdin.carbon | ||
// TIP: To dump output, run: | ||
// TIP: bazel run //testing/file_test:file_test_base_test -- --dump_output --file_tests=testing/file_test/testdata/stdin.carbon | ||
|
||
// --- a.carbon | ||
|
||
// --- STDIN | ||
|
||
S | ||
t | ||
d | ||
i | ||
n | ||
|
||
// --- AUTOUPDATE-SPLIT | ||
|
||
// CHECK:STDERR: | ||
// CHECK:STDERR: S | ||
// CHECK:STDERR: t | ||
// CHECK:STDERR: d | ||
// CHECK:STDERR: i | ||
// CHECK:STDERR: n | ||
// CHECK:STDERR: | ||
// CHECK:STDOUT: 2 args: `default_args`, `a.carbon` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters