View | Details | Raw Unified | Return to bug 243974 | Differences between
and this patch

Collapse All | Expand All

(-)b/usr.bin/diff/diff.1 (-7 / +7 lines)
Lines 30-36 Link Here
30
.\"     @(#)diff.1	8.1 (Berkeley) 6/30/93
30
.\"     @(#)diff.1	8.1 (Berkeley) 6/30/93
31
.\" $FreeBSD$
31
.\" $FreeBSD$
32
.\"
32
.\"
33
.Dd February 12, 2020
33
.Dd February 13, 2020
34
.Dt DIFF 1
34
.Dt DIFF 1
35
.Os
35
.Os
36
.Sh NAME
36
.Sh NAME
Lines 60-66 Link Here
60
.Op Fl -starting-file
60
.Op Fl -starting-file
61
.Op Fl -speed-large-files
61
.Op Fl -speed-large-files
62
.Op Fl -strip-trailing-cr
62
.Op Fl -strip-trailing-cr
63
.Op Fl -tabsize
63
.Op Fl -tabsize Ar number
64
.Op Fl -text
64
.Op Fl -text
65
.Op Fl -unified
65
.Op Fl -unified
66
.Op Fl I Ar pattern | Fl -ignore-matching-lines Ar pattern
66
.Op Fl I Ar pattern | Fl -ignore-matching-lines Ar pattern
Lines 88-94 Link Here
88
.Op Fl -speed-large-files
88
.Op Fl -speed-large-files
89
.Op Fl -starting-file
89
.Op Fl -starting-file
90
.Op Fl -strip-trailing-cr
90
.Op Fl -strip-trailing-cr
91
.Op Fl -tabsize
91
.Op Fl -tabsize Ar number
92
.Op Fl -text
92
.Op Fl -text
93
.Fl C Ar number | -context Ar number
93
.Fl C Ar number | -context Ar number
94
.Ar file1 file2
94
.Ar file1 file2
Lines 113-119 Link Here
113
.Op Fl -speed-large-files
113
.Op Fl -speed-large-files
114
.Op Fl -starting-file
114
.Op Fl -starting-file
115
.Op Fl -strip-trailing-cr
115
.Op Fl -strip-trailing-cr
116
.Op Fl -tabsize
116
.Op Fl -tabsize Ar number
117
.Op Fl -text
117
.Op Fl -text
118
.Fl D Ar string | Fl -ifdef Ar string
118
.Fl D Ar string | Fl -ifdef Ar string
119
.Ar file1 file2
119
.Ar file1 file2
Lines 139-145 Link Here
139
.Op Fl -speed-large-files
139
.Op Fl -speed-large-files
140
.Op Fl -starting-file
140
.Op Fl -starting-file
141
.Op Fl -strip-trailing-cr
141
.Op Fl -strip-trailing-cr
142
.Op Fl -tabsize
142
.Op Fl -tabsize Ar number
143
.Op Fl -text
143
.Op Fl -text
144
.Fl U Ar number | Fl -unified Ar number
144
.Fl U Ar number | Fl -unified Ar number
145
.Ar file1 file2
145
.Ar file1 file2
Lines 170-176 Link Here
170
.Op Fl -show-c-function
170
.Op Fl -show-c-function
171
.Op Fl -speed-large-files
171
.Op Fl -speed-large-files
172
.Op Fl -strip-trailing-cr
172
.Op Fl -strip-trailing-cr
173
.Op Fl -tabsize
173
.Op Fl -tabsize Ar number
174
.Op Fl -text
174
.Op Fl -text
175
.Op Fl -unidirectional-new-file
175
.Op Fl -unidirectional-new-file
176
.Op Fl -unified
176
.Op Fl -unified
Lines 192-198 Link Here
192
.Op Fl -no-ignore-file-name-case
192
.Op Fl -no-ignore-file-name-case
193
.Op Fl -strip-trailing-cr
193
.Op Fl -strip-trailing-cr
194
.Op Fl -suppress-common-lines
194
.Op Fl -suppress-common-lines
195
.Op Fl -tabsize
195
.Op Fl -tabsize Ar number
196
.Op Fl -text
196
.Op Fl -text
197
.Op Fl -width
197
.Op Fl -width
198
.Fl y | Fl -side-by-side
198
.Fl y | Fl -side-by-side
(-)b/usr.bin/diff/diff.c (-1 / +1 lines)
Lines 93-99 static struct option longopts[] = { Link Here
93
	{ "no-ignore-file-name-case",	no_argument,		NULL,	OPT_NO_IGN_FN_CASE },
93
	{ "no-ignore-file-name-case",	no_argument,		NULL,	OPT_NO_IGN_FN_CASE },
94
	{ "normal",			no_argument,		NULL,	OPT_NORMAL },
94
	{ "normal",			no_argument,		NULL,	OPT_NORMAL },
95
	{ "strip-trailing-cr",		no_argument,		NULL,	OPT_STRIPCR },
95
	{ "strip-trailing-cr",		no_argument,		NULL,	OPT_STRIPCR },
96
	{ "tabsize",			optional_argument,	NULL,	OPT_TSIZE },
96
	{ "tabsize",			required_argument,	NULL,	OPT_TSIZE },
97
	{ "changed-group-format",	required_argument,	NULL,	OPT_CHANGED_GROUP_FORMAT},
97
	{ "changed-group-format",	required_argument,	NULL,	OPT_CHANGED_GROUP_FORMAT},
98
	{ "suppress-common-lines",	no_argument,		NULL,	OPT_SUPPRESS_COMMON },
98
	{ "suppress-common-lines",	no_argument,		NULL,	OPT_SUPPRESS_COMMON },
99
	{ NULL,				0,			0,	'\0'}
99
	{ NULL,				0,			0,	'\0'}
(-)b/usr.bin/diff/tests/diff_test.sh (+12 lines)
Lines 10-15 atf_test_case side_by_side Link Here
10
atf_test_case brief_format
10
atf_test_case brief_format
11
atf_test_case b230049
11
atf_test_case b230049
12
atf_test_case Bflag
12
atf_test_case Bflag
13
atf_test_case tabsize
13
14
14
simple_body()
15
simple_body()
15
{
16
{
Lines 164-169 Bflag_body() Link Here
164
	atf_check -s exit:1 -o file:"$(atf_get_srcdir)/Bflag_F.out" diff -B E F
165
	atf_check -s exit:1 -o file:"$(atf_get_srcdir)/Bflag_F.out" diff -B E F
165
}
166
}
166
167
168
tabsize_body()
169
{
170
	printf "\tA\n" > A
171
	printf "\tB\n" > B
172
173
	atf_check -s exit:1 \
174
	    -o inline:"1c1\n<  A\n---\n>  B\n" \
175
	    diff -t --tabsize 1 A B
176
}
177
167
atf_init_test_cases()
178
atf_init_test_cases()
168
{
179
{
169
	atf_add_test_case simple
180
	atf_add_test_case simple
Lines 176-179 atf_init_test_cases() Link Here
176
	atf_add_test_case brief_format
187
	atf_add_test_case brief_format
177
	atf_add_test_case b230049
188
	atf_add_test_case b230049
178
	atf_add_test_case Bflag
189
	atf_add_test_case Bflag
190
	atf_add_test_case tabsize
179
}
191
}

Return to bug 243974