diff options
| author | Divy Srivastava <dj.srivastava23@gmail.com> | 2022-03-31 14:11:30 +0530 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2022-03-31 14:11:30 +0530 |
| commit | b0f974fbfd39db2d7c9d37d4c3ed3f21526d7ca3 (patch) | |
| tree | 6efb0f69737993cfd0b7551e05a951162a73ede4 /cli/tests/integration | |
| parent | 1d24b2cf6335d18ccf8c9c9840fd466011f546c3 (diff) | |
fix(compile): follow redirects when resolving (#14161)
Diffstat (limited to 'cli/tests/integration')
| -rw-r--r-- | cli/tests/integration/compile_tests.rs | 33 |
1 files changed, 33 insertions, 0 deletions
diff --git a/cli/tests/integration/compile_tests.rs b/cli/tests/integration/compile_tests.rs index 9d1001ed6..82a98115a 100644 --- a/cli/tests/integration/compile_tests.rs +++ b/cli/tests/integration/compile_tests.rs @@ -186,6 +186,39 @@ fn standalone_load_datauri() { assert_eq!(output.stdout, b"Hello Deno!\n"); } +// https://github.com/denoland/deno/issues/13704 +#[test] +fn standalone_follow_redirects() { + let dir = TempDir::new().unwrap(); + let exe = if cfg!(windows) { + dir.path().join("follow_redirects.exe") + } else { + dir.path().join("follow_redirects") + }; + let output = util::deno_cmd() + .current_dir(util::testdata_path()) + .arg("compile") + .arg("--unstable") + .arg("--output") + .arg(&exe) + .arg("./standalone_follow_redirects.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\n"); +} + #[test] fn standalone_compiler_ops() { let dir = TempDir::new().unwrap(); |
