summaryrefslogtreecommitdiff
path: root/www/deno/files/patch-cli_tools_compile.rs
blob: a57479bc19368d36be67ea0d2eeb3e68e1a906a2 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
--- cli/tools/compile.rs.orig	2025-04-01 12:15:22 UTC
+++ cli/tools/compile.rs
@@ -492,6 +492,32 @@ mod test {
   }
 
   #[tokio::test]
+  async fn resolve_compile_executable_output_path_target_freebsd() {
+    let http_client = HttpClientProvider::new(None, None);
+    let path = resolve_compile_executable_output_path(
+      &http_client,
+      &CompileFlags {
+        source_file: "mod.ts".to_string(),
+        output: Some(String::from("./file")),
+        args: Vec::new(),
+        target: Some("x86_64-unknown-freebsd".to_string()),
+        no_terminal: false,
+        icon: None,
+        include: vec![],
+        eszip: true,
+      },
+      &std::env::current_dir().unwrap(),
+    )
+    .await
+    .unwrap();
+
+    // no extension, no matter what the operating system is
+    // because the target was specified as freebsd
+    // https://github.com/denoland/deno/issues/9667
+    assert_eq!(path.file_name().unwrap(), "file");
+  }
+
+  #[tokio::test]
   async fn resolve_compile_executable_output_path_target_windows() {
     let http_client = HttpClientProvider::new(None, None);
     let path = resolve_compile_executable_output_path(