summaryrefslogtreecommitdiff
path: root/testing
diff options
context:
space:
mode:
Diffstat (limited to 'testing')
-rw-r--r--testing/library.yarn13
1 files changed, 9 insertions, 4 deletions
diff --git a/testing/library.yarn b/testing/library.yarn
index e6abaf5..b829ce6 100644
--- a/testing/library.yarn
+++ b/testing/library.yarn
@@ -187,10 +187,15 @@ Admin repo manipulation
test "$MATCH_3" = ""
fi
- IMPLEMENTS WHEN ([a-z][a-z0-9]*) applies ([^ ]+) in ([^ ]+)
- $GTT rungit $MATCH_1 $MATCH_3 apply --cached - <"testing/content-patches/$MATCH_2" \
- >$DATADIR/stdout 2>$DATADIR/stderr
- $GTT rungit $MATCH_1 $MATCH_3 commit --allow-empty -m "Apply $MATCH_2 content change" \
+ IMPLEMENTS WHEN ([a-z][a-z0-9]*) (applies|reverts) ([^ ]+) in ([^ ]+)
+ if test "$MATCH_2" = "applies"; then
+ $GTT rungit $MATCH_1 $MATCH_4 apply --cached - <"testing/content-patches/$MATCH_3" \
+ >$DATADIR/stdout 2>$DATADIR/stderr
+ else
+ $GTT rungit $MATCH_1 $MATCH_4 apply --cached --reverse - <"testing/content-patches/$MATCH_3" \
+ >$DATADIR/stdout 2>$DATADIR/stderr
+ fi
+ $GTT rungit $MATCH_1 $MATCH_4 commit --allow-empty -m "Apply $MATCH_3 content change" \
>>$DATADIR/stdout 2>>$DATADIR/stderr