forked from approvals/ApprovalTests.cpp
-
Notifications
You must be signed in to change notification settings - Fork 0
/
DiffPrograms.cpp
180 lines (148 loc) · 7.32 KB
/
DiffPrograms.cpp
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
#include "ApprovalTests/reporters/DiffPrograms.h"
///////////////////////////////////////////////////////////////////////////////
#define APPROVAL_TESTS_MACROS_ENTRY(name, defaultValue) \
DiffInfo name() \
{ \
return defaultValue; \
}
///////////////////////////////////////////////////////////////////////////////
namespace ApprovalTests
{
namespace DiffPrograms
{
namespace Mac
{
APPROVAL_TESTS_MACROS_ENTRY(
DIFF_MERGE,
DiffInfo("/Applications/DiffMerge.app/Contents/MacOS/DiffMerge",
"{Received} {Approved} -nosplash",
Type::TEXT))
// begin-snippet: add_reporter_macro_implementation
APPROVAL_TESTS_MACROS_ENTRY(
ARAXIS_MERGE,
DiffInfo("/Applications/Araxis Merge.app/Contents/Utilities/compare",
Type::TEXT_AND_IMAGE))
// end-snippet
APPROVAL_TESTS_MACROS_ENTRY(
BEYOND_COMPARE,
DiffInfo("/Applications/Beyond Compare.app/Contents/MacOS/bcomp",
Type::TEXT))
APPROVAL_TESTS_MACROS_ENTRY(
KALEIDOSCOPE,
DiffInfo("/Applications/Kaleidoscope.app/Contents/MacOS/ksdiff",
Type::TEXT_AND_IMAGE))
APPROVAL_TESTS_MACROS_ENTRY(
SUBLIME_MERGE,
DiffInfo("/Applications/Sublime "
"Merge.app/Contents/SharedSupport/bin/smerge",
"mergetool --no-wait {Received} {Approved} -o {Approved}",
Type::TEXT))
APPROVAL_TESTS_MACROS_ENTRY(
KDIFF3,
DiffInfo("/Applications/kdiff3.app/Contents/MacOS/kdiff3",
"{Received} {Approved} -m -o {Approved}",
Type::TEXT))
APPROVAL_TESTS_MACROS_ENTRY(
P4MERGE,
DiffInfo("/Applications/p4merge.app/Contents/MacOS/p4merge",
Type::TEXT_AND_IMAGE))
APPROVAL_TESTS_MACROS_ENTRY(
TK_DIFF,
DiffInfo("/Applications/TkDiff.app/Contents/MacOS/tkdiff", Type::TEXT))
APPROVAL_TESTS_MACROS_ENTRY(
VS_CODE,
DiffInfo("/Applications/Visual Studio "
"Code.app/Contents/Resources/app/bin/code",
"-d {Received} {Approved}",
Type::TEXT))
APPROVAL_TESTS_MACROS_ENTRY(CLION,
DiffInfo("clion",
"nosplash diff {Received} {Approved}",
Type::TEXT))
}
namespace Linux
{
APPROVAL_TESTS_MACROS_ENTRY(
SUBLIME_MERGE_SNAP,
DiffInfo("/snap/bin/sublime-merge",
"mergetool --no-wait {Received} {Approved} -o {Approved}",
Type::TEXT))
APPROVAL_TESTS_MACROS_ENTRY(
SUBLIME_MERGE_FLATPAK,
DiffInfo("/var/lib/flatpak/exports/bin/com.sublimemerge.App",
"mergetool --no-wait {Received} {Approved} -o {Approved}",
Type::TEXT))
APPROVAL_TESTS_MACROS_ENTRY(
SUBLIME_MERGE_REPOSITORY_PACKAGE,
DiffInfo("smerge",
"mergetool --no-wait {Received} {Approved} -o {Approved}",
Type::TEXT))
APPROVAL_TESTS_MACROS_ENTRY(
SUBLIME_MERGE_DIRECT_DOWNLOAD,
DiffInfo("/opt/sublime_merge/sublime_merge",
"mergetool --no-wait {Received} {Approved} -o {Approved}",
Type::TEXT))
// More ideas available from: https://www.tecmint.com/best-linux-file-diff-tools-comparison/
APPROVAL_TESTS_MACROS_ENTRY(KDIFF3,
DiffInfo("kdiff3",
"{Received} {Approved} -m -o {Approved}",
Type::TEXT))
APPROVAL_TESTS_MACROS_ENTRY(MELD, DiffInfo("meld", Type::TEXT))
APPROVAL_TESTS_MACROS_ENTRY(BEYOND_COMPARE,
DiffInfo("bcompare", Type::TEXT_AND_IMAGE))
}
namespace Windows
{
APPROVAL_TESTS_MACROS_ENTRY(
BEYOND_COMPARE_3,
DiffInfo("{ProgramFiles}Beyond Compare 3\\BCompare.exe",
Type::TEXT_AND_IMAGE))
APPROVAL_TESTS_MACROS_ENTRY(
BEYOND_COMPARE_4,
DiffInfo("{ProgramFiles}Beyond Compare 4\\BCompare.exe",
Type::TEXT_AND_IMAGE))
APPROVAL_TESTS_MACROS_ENTRY(
TORTOISE_IMAGE_DIFF,
DiffInfo("{ProgramFiles}TortoiseSVN\\bin\\TortoiseIDiff.exe",
"/left:{Received} /right:{Approved}",
Type::IMAGE))
APPROVAL_TESTS_MACROS_ENTRY(
TORTOISE_TEXT_DIFF,
DiffInfo("{ProgramFiles}TortoiseSVN\\bin\\TortoiseMerge.exe", Type::TEXT))
APPROVAL_TESTS_MACROS_ENTRY(
TORTOISE_GIT_IMAGE_DIFF,
DiffInfo("{ProgramFiles}TortoiseGit\\bin\\TortoiseGitIDiff.exe",
"/left:{Received} /right:{Approved}",
Type::IMAGE))
APPROVAL_TESTS_MACROS_ENTRY(
TORTOISE_GIT_TEXT_DIFF,
DiffInfo("{ProgramFiles}TortoiseGit\\bin\\TortoiseGitMerge.exe",
Type::TEXT))
APPROVAL_TESTS_MACROS_ENTRY(WIN_MERGE_REPORTER,
DiffInfo("{ProgramFiles}WinMerge\\WinMergeU.exe",
Type::TEXT_AND_IMAGE))
APPROVAL_TESTS_MACROS_ENTRY(
ARAXIS_MERGE,
DiffInfo("{ProgramFiles}Araxis\\Araxis Merge\\Compare.exe",
Type::TEXT_AND_IMAGE))
APPROVAL_TESTS_MACROS_ENTRY(
CODE_COMPARE,
DiffInfo("{ProgramFiles}Devart\\Code Compare\\CodeCompare.exe",
Type::TEXT))
APPROVAL_TESTS_MACROS_ENTRY(
SUBLIME_MERGE,
DiffInfo("{ProgramFiles}Sublime Merge\\smerge.exe",
"mergetool --no-wait {Received} {Approved} -o {Approved}",
Type::TEXT))
APPROVAL_TESTS_MACROS_ENTRY(KDIFF3,
DiffInfo("{ProgramFiles}KDiff3\\bin\\kdiff3.exe",
"{Received} {Approved} -m -o {Approved}",
Type::TEXT))
APPROVAL_TESTS_MACROS_ENTRY(
VS_CODE,
DiffInfo("{ProgramFiles}Microsoft VS Code\\Code.exe",
"-d {Received} {Approved}",
Type::TEXT))
}
}
}