We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent c9162ef commit c5fa8f9Copy full SHA for c5fa8f9
cpp/files/hello-world.sh
@@ -4,4 +4,4 @@ set -e
4
5
cd /hello-world
6
g++ -o hello hello-world.cpp || exit 1
7
-./hello
+./hello "$@"
cpp/fraglet/verify.sh
@@ -85,4 +85,15 @@ int main() {
85
}
86
EOF
87
88
+# Example 7: Argument passing
89
+echo "Testing argument passing..."
90
+fragletc --image "$IMAGE" - arg1 arg2 <<'EOF' 2>&1 | grep -q "First: arg1"
91
+#include <iostream>
92
+int main(int argc, char *argv[]) {
93
+ if (argc > 1) std::cout << "First: " << argv[1] << std::endl;
94
+ if (argc > 2) std::cout << "Second: " << argv[2] << std::endl;
95
+ return 0;
96
+}
97
+EOF
98
+
99
echo "✓ All tests passed"
0 commit comments