mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-09-27 12:29:21 +00:00
Add light-weight snapshot testing library with editor integration
This commit is contained in:
parent
491d000c27
commit
03c5a6690d
8 changed files with 357 additions and 5 deletions
|
@ -108,12 +108,16 @@ export async function createTask(runnable: ra.Runnable, config: Config): Promise
|
|||
if (runnable.args.executableArgs.length > 0) {
|
||||
args.push('--', ...runnable.args.executableArgs);
|
||||
}
|
||||
const env: { [key: string]: string } = { "RUST_BACKTRACE": "short" };
|
||||
if (runnable.args.expectTest) {
|
||||
env["UPDATE_EXPECT"] = "1";
|
||||
}
|
||||
const definition: tasks.CargoTaskDefinition = {
|
||||
type: tasks.TASK_TYPE,
|
||||
command: args[0], // run, test, etc...
|
||||
args: args.slice(1),
|
||||
cwd: runnable.args.workspaceRoot,
|
||||
env: Object.assign({}, process.env as { [key: string]: string }, { "RUST_BACKTRACE": "short" }),
|
||||
env: Object.assign({}, process.env as { [key: string]: string }, env),
|
||||
};
|
||||
|
||||
const target = vscode.workspace.workspaceFolders![0]; // safe, see main activate()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue