mirror of
https://github.com/denoland/deno.git
synced 2025-08-04 10:59:13 +00:00
BREAKING: Remove unstable Deno.emit and Deno.formatDiagnostics APIs (#14463)
This commit is contained in:
parent
9766399a3f
commit
f57aac77ff
32 changed files with 7 additions and 1957 deletions
|
@ -225,76 +225,6 @@ fn standalone_follow_redirects() {
|
|||
assert_eq!(output.stdout, b"Hello\n");
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn standalone_compiler_ops() {
|
||||
let dir = TempDir::new();
|
||||
let exe = if cfg!(windows) {
|
||||
dir.path().join("standalone_compiler_ops.exe")
|
||||
} else {
|
||||
dir.path().join("standalone_compiler_ops")
|
||||
};
|
||||
let output = util::deno_cmd()
|
||||
.current_dir(util::testdata_path())
|
||||
.arg("compile")
|
||||
.arg("--unstable")
|
||||
.arg("--output")
|
||||
.arg(&exe)
|
||||
.arg("./standalone_compiler_ops.ts")
|
||||
.stdout(std::process::Stdio::piped())
|
||||
.spawn()
|
||||
.unwrap()
|
||||
.wait_with_output()
|
||||
.unwrap();
|
||||
assert!(output.status.success());
|
||||
let output = Command::new(exe)
|
||||
.stdout(std::process::Stdio::piped())
|
||||
.stderr(std::process::Stdio::piped())
|
||||
.spawn()
|
||||
.unwrap()
|
||||
.wait_with_output()
|
||||
.unwrap();
|
||||
assert!(output.status.success());
|
||||
assert_eq!(output.stdout, b"Hello, Compiler API!\n");
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn compile_with_directory_output_flag() {
|
||||
let dir = TempDir::new();
|
||||
let output_path = if cfg!(windows) {
|
||||
dir.path().join(r"args\random\")
|
||||
} else {
|
||||
dir.path().join("args/random/")
|
||||
};
|
||||
let output = util::deno_cmd()
|
||||
.current_dir(util::testdata_path())
|
||||
.arg("compile")
|
||||
.arg("--unstable")
|
||||
.arg("--output")
|
||||
.arg(&output_path)
|
||||
.arg("./standalone_compiler_ops.ts")
|
||||
.stdout(std::process::Stdio::piped())
|
||||
.spawn()
|
||||
.unwrap()
|
||||
.wait_with_output()
|
||||
.unwrap();
|
||||
assert!(output.status.success());
|
||||
let exe = if cfg!(windows) {
|
||||
output_path.join("standalone_compiler_ops.exe")
|
||||
} else {
|
||||
output_path.join("standalone_compiler_ops")
|
||||
};
|
||||
assert!(&exe.exists());
|
||||
let output = Command::new(exe)
|
||||
.stdout(std::process::Stdio::piped())
|
||||
.stderr(std::process::Stdio::piped())
|
||||
.spawn()
|
||||
.unwrap()
|
||||
.wait_with_output()
|
||||
.unwrap();
|
||||
assert!(output.status.success());
|
||||
assert_eq!(output.stdout, b"Hello, Compiler API!\n");
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn compile_with_file_exists_error() {
|
||||
let dir = TempDir::new();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue