blob: 9b1a74542a848ef702c1e6208d6ff2537b0f6ac0 [file] [log] [blame]
Junio C Hamano4839c0b2006-06-17 15:20:36 -07001#!/bin/sh
2#
3# Copyright (c) 2005 Junio C Hamano
4#
5
Junio C Hamano5be60072007-07-02 22:52:14 -07006test_description='git mailinfo and git mailsplit test'
Junio C Hamano4839c0b2006-06-17 15:20:36 -07007
8. ./test-lib.sh
9
10test_expect_success 'split sample box' \
Junio C Hamano5be60072007-07-02 22:52:14 -070011 'git mailsplit -o. ../t5100/sample.mbox >last &&
Junio C Hamano4839c0b2006-06-17 15:20:36 -070012 last=`cat last` &&
13 echo total is $last &&
Don Zickusae1a7432007-03-12 15:52:07 -040014 test `cat last` = 8'
Junio C Hamano4839c0b2006-06-17 15:20:36 -070015
16for mail in `echo 00*`
17do
18 test_expect_success "mailinfo $mail" \
Junio C Hamano5be60072007-07-02 22:52:14 -070019 "git mailinfo -u msg$mail patch$mail <$mail >info$mail &&
Junio C Hamano4839c0b2006-06-17 15:20:36 -070020 echo msg &&
21 diff ../t5100/msg$mail msg$mail &&
22 echo patch &&
23 diff ../t5100/patch$mail patch$mail &&
24 echo info &&
25 diff ../t5100/info$mail info$mail"
26done
27
28test_done