actions/* + lib/* + CHANGELOG — merge upstream 0.6.0 onto the forge tree, and port every gh call site it brought (#198) #204
1 changed files with 14 additions and 4 deletions
|
|
@ -264,10 +264,20 @@ check "the marker survives a cross-repo reference's punctuation" 0 \
|
||||||
check "the slug alone cannot separate a qualified ref from a hyphenated one" 0 "" \
|
check "the slug alone cannot separate a qualified ref from a hyphenated one" 0 "" \
|
||||||
test "$(printf '%s' '{acme/widgets#9}' | tr -c '[:alnum:]' '-' | sed 's/--*/-/g; s/^-//; s/-$//')" \
|
test "$(printf '%s' '{acme/widgets#9}' | tr -c '[:alnum:]' '-' | sed 's/--*/-/g; s/^-//; s/-$//')" \
|
||||||
= "$(printf '%s' '{acme-widgets#9}' | tr -c '[:alnum:]' '-' | sed 's/--*/-/g; s/^-//; s/-$//')"
|
= "$(printf '%s' '{acme-widgets#9}' | tr -c '[:alnum:]' '-' | sed 's/--*/-/g; s/^-//; s/-$//')"
|
||||||
for collides_with_acme_widgets in '{acme-widgets#9}' '{acme_widgets#9}' '{acme.widgets#9}'; do
|
# Pairwise, and deliberately so. Anchoring every pair on the `/` spelling
|
||||||
check "...but the marker does, against $collides_with_acme_widgets" 1 "" test \
|
# would pass under a fix that only taught the slug about `/` — and that fix
|
||||||
"$(blocked_parse_marker '{acme/widgets#9}')" \
|
# leaves `{acme-widgets#9}`, `{acme_widgets#9}` and `{acme.widgets#9}` sharing
|
||||||
= "$(blocked_parse_marker "$collides_with_acme_widgets")"
|
# one marker. The contract is that no two distinct parses collide, so the test
|
||||||
|
# is every pair, not every pair through one representative.
|
||||||
|
marker_family=(
|
||||||
|
'{acme/widgets#9}' '{acme-widgets#9}' '{acme_widgets#9}' '{acme.widgets#9}'
|
||||||
|
)
|
||||||
|
for left in "${marker_family[@]}"; do
|
||||||
|
for right in "${marker_family[@]}"; do
|
||||||
|
[ "$left" != "$right" ] || continue
|
||||||
|
check "...but the marker does: $left vs $right" 1 "" test \
|
||||||
|
"$(blocked_parse_marker "$left")" = "$(blocked_parse_marker "$right")"
|
||||||
|
done
|
||||||
done
|
done
|
||||||
check "the qualifier's punctuation reaches the marker's identity" 1 "" test \
|
check "the qualifier's punctuation reaches the marker's identity" 1 "" test \
|
||||||
"$(blocked_parse_marker '{#12, heavy-duty/box#9}')" \
|
"$(blocked_parse_marker '{#12, heavy-duty/box#9}')" \
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue