2
# vim: set syntax=cram :
4
# This file is part of git-big-picture
6
# Copyright (C) 2012 Valentin Haenel <valentin.haenel@gmx.de>
8
# git-big-picture is free software: you can redistribute it and/or modify
9
# it under the terms of the GNU General Public License as published by
10
# the Free Software Foundation, either version 3 of the License, or
11
# (at your option) any later version.
13
# git-big-piture is distributed in the hope that it will be useful,
14
# but WITHOUT ANY WARRANTY; without even the implied warranty of
15
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16
# GNU General Public License for more details.
18
# You should have received a copy of the GNU General Public License
19
# along with git-big-picture. If not, see <http://www.gnu.org/licenses/>.
21
Cram (http://pypi.python.org/pypi/cram) tests for git-big-picture
26
fatal: '/tmp/cramtests-.{6}/test.cram' is probably not a Git repository (re)
29
create a fake repo and export vars
32
$ git commit -q --allow-empty -m "foo"
33
$ export outfile_svg='file.svg'
34
$ export viewer='true'
35
$ export stats_file='stats'
40
fatal: Must provide an output option. Try '-h' for more information
45
# $ git-big-picture -p
47
# \t"[0-9a-f]{40}"[label="master", color="/pastel13/2", style=filled]; (re) (esc)
51
mix --graphiz and --processed and others
53
$ git-big-picture -p -g
54
fatal: Options '-g | --graphviz' and '-p | --processed' are mutually exclusive.
56
$ git-big-picture -g -v $viewer
57
fatal: Options '-g | --graphviz' and '-p | --processed' are incompatible with other output options.
59
$ git-big-picture -p -v $viewer
60
fatal: Options '-g | --graphviz' and '-p | --processed' are incompatible with other output options.
62
$ git-big-picture -g -o $outfile_svg
63
fatal: Options '-g | --graphviz' and '-p | --processed' are incompatible with other output options.
65
$ git-big-picture -p -o $outfile_svg
66
fatal: Options '-g | --graphviz' and '-p | --processed' are incompatible with other output options.
71
$ git-big-picture -p -f foo
72
fatal: 'dot' terminated prematurely with error code 1;
73
probably you specified an invalid format, see 'man dot'.
74
The error from 'dot' was:
75
>>>Format: "foo" not recognized. Use one of: canon cmap cmapx cmapx_np dot eps fig gd gd2 gif gv imap imap_np ismap jpe jpeg jpg pdf plain plain-ext png ps ps2 svg svgz tk vml vmlz vrml wbmp x11 xdot xlib
80
mismatch format, filename takes precedence
82
$ git-big-picture -f pdf -o $outfile_svg
90
$ git-big-picture -o $outfile_svg
96
try using differnt format
98
$ git-big-picture -o file.pdf
107
$ git-big-picture -f svg -v foo
108
fatal: Error calling viewer: 'foo':
109
>>>[Errno 2] No such file or directory
112
format but no extension
114
$ git-big-picture -f svg -o file
115
warning: Filename had no suffix, using format: svg
121
provide filename and viewer
123
$ git-big-picture -o $outfile_svg -v $viewer
129
provide filename and viewer and format
131
$ git-big-picture -f png -o file -v $viewer
132
warning: Filename had no suffix, using format: png
140
$ git-big-picture --pstats=$stats_file -o $outfile_svg
143
$ rm $stats_file $outfile_svg