From 78824c11569829e73a58e446ca21ec34b87b235f Mon Sep 17 00:00:00 2001 From: Chuck Grindel Date: Sat, 25 Jan 2025 08:07:01 -0700 Subject: [PATCH] fix: pkg_manifest_minimal example --- examples/pkg_manifest_minimal/do_test | 1 + .../Sources/NotThatAmazingModule/NotThatAmazingModule.swift | 4 ++-- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/examples/pkg_manifest_minimal/do_test b/examples/pkg_manifest_minimal/do_test index f15f4c903..75c2894bb 100755 --- a/examples/pkg_manifest_minimal/do_test +++ b/examples/pkg_manifest_minimal/do_test @@ -24,6 +24,7 @@ assert_match() { # Run MyExecutable target output="$("${bazel}" run //Sources/MyExecutable)" assert_match "Good morning, World!" "${output}" +assert_match "Olivia .* 30 years old" "${output}" # Run old-style executable in my_local_package output="$("${bazel}" run @swiftpkg_my_local_package//:print-greeting)" diff --git a/examples/pkg_manifest_minimal/third_party/NotThatAmazingModule/Sources/NotThatAmazingModule/NotThatAmazingModule.swift b/examples/pkg_manifest_minimal/third_party/NotThatAmazingModule/Sources/NotThatAmazingModule/NotThatAmazingModule.swift index 46f5df6f8..8786545f9 100644 --- a/examples/pkg_manifest_minimal/third_party/NotThatAmazingModule/Sources/NotThatAmazingModule/NotThatAmazingModule.swift +++ b/examples/pkg_manifest_minimal/third_party/NotThatAmazingModule/Sources/NotThatAmazingModule/NotThatAmazingModule.swift @@ -11,8 +11,8 @@ public class ComplexClass { self.favoriteColors = favoriteColors } - public func greet() { - print("Hello, my name is \(name) and I'm \(age) years old.") + public func greet() -> String { + return "Hello, my name is \(name) and I'm \(age) years old." } public func addFavoriteColor(color: String) {