summaryrefslogtreecommitdiff
path: root/yarns/implementations.yarn
diff options
context:
space:
mode:
authorRichard Maw <richard.maw@codethink.co.uk>2014-02-17 14:28:15 +0000
committerRichard Maw <richard.maw@codethink.co.uk>2014-02-17 14:28:15 +0000
commita859a3377f488ef11ebed2631dbd51b2aa82afe4 (patch)
treed6c141557430c6a808abd80c9fdbf26c44ba1eea /yarns/implementations.yarn
parent8f8fc96b884e7f175d4a01bc2d91452d7149bf33 (diff)
parentd036610974f229a806d682c6d051c299f6396d2f (diff)
downloadmorph-a859a3377f488ef11ebed2631dbd51b2aa82afe4.tar.gz
Merge remote-tracking branch 'origin/baserock/richardmaw/10312/ensure-not-add-repo-ref'
This includes a typo fix of Unpertify -> Unpetrify Reviewed-by: Lars Wirzenius
Diffstat (limited to 'yarns/implementations.yarn')
-rw-r--r--yarns/implementations.yarn16
1 files changed, 11 insertions, 5 deletions
diff --git a/yarns/implementations.yarn b/yarns/implementations.yarn
index 2a46dfa2..ccebabca 100644
--- a/yarns/implementations.yarn
+++ b/yarns/implementations.yarn
@@ -409,14 +409,20 @@ Report system branch root repository.
Editing morphologies with `morph edit`.
- IMPLEMENTS THEN in branch (\S+), (system|stratum) (\S+) refs (\S+) in (\S+)
- if [ $MATCH_2 == system ]; then set strata; else set chunks; fi
+ IMPLEMENTS THEN in branch (\S+), stratum (\S+) refs (\S+) in (\S+)
"$SRCDIR/scripts/yaml-extract" \
- "$DATADIR/workspace/$MATCH_1/test:morphs/$MATCH_3.morph" \
- $@ name="$MATCH_4" ref > "$DATADIR/ref.actual"
- echo "$MATCH_5" > "$DATADIR/ref.wanted"
+ "$DATADIR/workspace/$MATCH_1/test:morphs/$MATCH_2.morph" \
+ chunks name="$MATCH_3" ref > "$DATADIR/ref.actual"
+ echo "$MATCH_4" > "$DATADIR/ref.wanted"
diff -u "$DATADIR/ref.wanted" "$DATADIR/ref.actual"
+ IMPLEMENTS THEN in branch (\S+), (system|stratum) (\S+) refers to (\S+) without (\S+)
+ if [ $MATCH_2 == system ]; then field=strata; else field=build-depends; fi
+ { ! "$SRCDIR/scripts/yaml-extract" \
+ "$DATADIR/workspace/$MATCH_1/test:morphs/$MATCH_3.morph" \
+ "$field" name="$MATCH_4" "$MATCH_5"; } 2>&1 |
+ grep -qFe "Object does not contain $MATCH_5"
+
IMPLEMENTS WHEN the user edits the stratum (\S+) in the system (\S+) in branch (\S+)
cd "$DATADIR/workspace/$MATCH_3/test:morphs"
run_morph edit "$MATCH_2" "$MATCH_1"