2 # Copyright (c) 2007 Karl Hasselström
3 test_description
='Test the pop command'
7 'Initialize the StGIT repository' \
11 'Create ten patches' '
12 for i in 0 1 2 3 4 5 6 7 8 9; do
15 [ "$(echo $(stg applied))" = "p0 p1 p2 p3 p4 p5 p6 p7 p8 p9" ] &&
16 [ "$(echo $(stg unapplied))" = "" ]
20 'Pop half the patches' '
22 [ "$(echo $(stg applied))" = "p0 p1 p2 p3 p4" ] &&
23 [ "$(echo $(stg unapplied))" = "p5 p6 p7 p8 p9" ]
27 'Pop the remaining patches' '
29 [ "$(echo $(stg applied))" = "" ] &&
30 [ "$(echo $(stg unapplied))" = "p0 p1 p2 p3 p4 p5 p6 p7 p8 p9" ]