06-leading-dash-with-double-dash.sh (562B)
1 # A leading-dash operand is unambiguous after `--`, both through `kit strip` 2 # and an installed multicall alias. 3 cat > dash.c <<'EOF' 4 int dash_symbol(void) { return 7; } 5 EOF 6 "$KIT" cc -g -c dash.c -o ./-dash.o 7 8 if "$KIT" strip --strip-debug -o direct.o -- -dash.o && 9 "$KIT" objdump -h direct.o >/dev/null; then 10 echo "direct: ok" 11 else 12 echo "direct: failed" 13 exit 1 14 fi 15 16 ln -s "$KIT" strip 17 if ./strip --strip-debug -o alias.o -- -dash.o && 18 "$KIT" objdump -h alias.o >/dev/null; then 19 echo "alias: ok" 20 else 21 echo "alias: failed" 22 exit 1 23 fi