Files
swift-mirror/validation-test/execution/interpret-with-dependencies.swift
Hamish Knight 345619e9cb [test] Remove a test for linking against libraries in the resource dir
This is no longer a behavior we have in the new driver
(swiftlang/swift-driver#733).
2024-09-22 19:40:06 +01:00

18 lines
524 B
Swift

// REQUIRES: OS=macosx
// RUN: %empty-directory(%t)
// REQUIRES: swift_interpreter
// RUN: echo 'int abc = 42;' | %clang -x c - -dynamiclib -Xlinker -install_name -Xlinker libabc.dylib -o %t/libabc.dylib -L %sdk/usr/lib
// RUN: echo 'int test() { extern int abc; return abc; }' | %clang -x c - -L%t -dynamiclib -labc -o %t/libfoo.dylib -L %sdk/usr/lib
// RUN: %swift_driver -I %S/Inputs/custom-modules -L%t %s | %FileCheck %s
// CHECK: {{okay}}
import foo
if test() == 42 {
print("okay")
} else {
print("problem")
}