t / t4109-apply-multifrag.shon commit Merge branch 'sp/maint-pack-memuse' (948e747)
   1#!/bin/sh
   2#
   3# Copyright (c) 2005 Junio C Hamano
   4# Copyright (c) 2005 Robert Fitzsimons
   5#
   6
   7test_description='git apply test patches with multiple fragments.
   8
   9'
  10. ./test-lib.sh
  11
  12cp ../t4109/patch1.patch .
  13cp ../t4109/patch2.patch .
  14cp ../t4109/patch3.patch .
  15cp ../t4109/patch4.patch .
  16
  17test_expect_success "S = git apply (1)" \
  18    'git apply patch1.patch patch2.patch'
  19mv main.c main.c.git
  20
  21test_expect_success "S = patch (1)" \
  22    'cat patch1.patch patch2.patch | patch -p1'
  23
  24test_expect_success "S = cmp (1)" \
  25    'cmp main.c.git main.c'
  26
  27rm -f main.c main.c.git
  28
  29test_expect_success "S = git apply (2)" \
  30    'git apply patch1.patch patch2.patch patch3.patch'
  31mv main.c main.c.git
  32
  33test_expect_success "S = patch (2)" \
  34    'cat patch1.patch patch2.patch patch3.patch | patch -p1'
  35
  36test_expect_success "S = cmp (2)" \
  37    'cmp main.c.git main.c'
  38
  39rm -f main.c main.c.git
  40
  41test_expect_success "S = git apply (3)" \
  42    'git apply patch1.patch patch4.patch'
  43mv main.c main.c.git
  44
  45test_expect_success "S = patch (3)" \
  46    'cat patch1.patch patch4.patch | patch -p1'
  47
  48test_expect_success "S = cmp (3)" \
  49    'cmp main.c.git main.c'
  50
  51test_done
  52