t / t3406-rebase-message.shon commit Merge branch 'st/tag' (df5e12f)
   1#!/bin/sh
   2
   3test_description='messages from rebase operation'
   4
   5. ./test-lib.sh
   6
   7quick_one () {
   8        echo "$1" >"file$1" &&
   9        git add "file$1" &&
  10        test_tick &&
  11        git commit -m "$1"
  12}
  13
  14test_expect_success setup '
  15        quick_one O &&
  16        git branch topic &&
  17        quick_one X &&
  18        quick_one A &&
  19        quick_one B &&
  20        quick_one Y &&
  21
  22        git checkout topic &&
  23        quick_one A &&
  24        quick_one B &&
  25        quick_one Z
  26
  27'
  28
  29cat >expect <<\EOF
  30Already applied: 0001 A
  31Already applied: 0002 B
  32Committed: 0003 Z
  33EOF
  34
  35test_expect_success 'rebase -m' '
  36
  37        git rebase -m master >report &&
  38        sed -n -e "/^Already applied: /p" \
  39                -e "/^Committed: /p" report >actual &&
  40        test_cmp expect actual
  41
  42'
  43
  44test_done