Skip to content

Commit 3eb585c

Browse files
avargitster
authored andcommitted
test-lib: rename the LIBPCRE prerequisite to PCRE
Rename the LIBPCRE prerequisite to PCRE. This is for preparation for libpcre2 support, where having just "LIBPCRE" would be confusing as it implies v1 of the library. None of these tests are incompatible between versions 1 & 2 of libpcre, it's less confusing to give them a more general name to make it clear that they work on both library versions. Signed-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
1 parent d048cb1 commit 3eb585c

File tree

5 files changed

+20
-20
lines changed

5 files changed

+20
-20
lines changed

t/README

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -803,9 +803,9 @@ use these, and "test_set_prereq" for how to define your own.
803803
Test is not run by root user, and an attempt to write to an
804804
unwritable file is expected to fail correctly.
805805

806-
- LIBPCRE
806+
- PCRE
807807

808-
Git was compiled with USE_LIBPCRE=YesPlease. Wrap any tests
808+
Git was compiled with support for PCRE. Wrap any tests
809809
that use git-grep --perl-regexp or git-grep -P in these.
810810

811811
- CASE_INSENSITIVE_FS

t/t7810-grep.sh

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -275,7 +275,7 @@ do
275275
test_cmp expected actual
276276
'
277277

278-
test_expect_success LIBPCRE "grep $L with grep.patterntype=perl" '
278+
test_expect_success PCRE "grep $L with grep.patterntype=perl" '
279279
echo "${HC}ab:a+b*c" >expected &&
280280
git -c grep.patterntype=perl grep "a\x{2b}b\x{2a}c" $H ab >actual &&
281281
test_cmp expected actual
@@ -1053,12 +1053,12 @@ hello.c:int main(int argc, const char **argv)
10531053
hello.c: printf("Hello world.\n");
10541054
EOF
10551055

1056-
test_expect_success LIBPCRE 'grep --perl-regexp pattern' '
1056+
test_expect_success PCRE 'grep --perl-regexp pattern' '
10571057
git grep --perl-regexp "\p{Ps}.*?\p{Pe}" hello.c >actual &&
10581058
test_cmp expected actual
10591059
'
10601060

1061-
test_expect_success LIBPCRE 'grep -P pattern' '
1061+
test_expect_success PCRE 'grep -P pattern' '
10621062
git grep -P "\p{Ps}.*?\p{Pe}" hello.c >actual &&
10631063
test_cmp expected actual
10641064
'
@@ -1070,13 +1070,13 @@ test_expect_success 'grep pattern with grep.extendedRegexp=true' '
10701070
test_cmp empty actual
10711071
'
10721072

1073-
test_expect_success LIBPCRE 'grep -P pattern with grep.extendedRegexp=true' '
1073+
test_expect_success PCRE 'grep -P pattern with grep.extendedRegexp=true' '
10741074
git -c grep.extendedregexp=true \
10751075
grep -P "\p{Ps}.*?\p{Pe}" hello.c >actual &&
10761076
test_cmp expected actual
10771077
'
10781078

1079-
test_expect_success LIBPCRE 'grep -P -v pattern' '
1079+
test_expect_success PCRE 'grep -P -v pattern' '
10801080
{
10811081
echo "ab:a+b*c"
10821082
echo "ab:a+bc"
@@ -1085,15 +1085,15 @@ test_expect_success LIBPCRE 'grep -P -v pattern' '
10851085
test_cmp expected actual
10861086
'
10871087

1088-
test_expect_success LIBPCRE 'grep -P -i pattern' '
1088+
test_expect_success PCRE 'grep -P -i pattern' '
10891089
cat >expected <<-EOF &&
10901090
hello.c: printf("Hello world.\n");
10911091
EOF
10921092
git grep -P -i "PRINTF\([^\d]+\)" hello.c >actual &&
10931093
test_cmp expected actual
10941094
'
10951095

1096-
test_expect_success LIBPCRE 'grep -P -w pattern' '
1096+
test_expect_success PCRE 'grep -P -w pattern' '
10971097
{
10981098
echo "hello_world:Hello world"
10991099
echo "hello_world:HeLLo world"
@@ -1118,11 +1118,11 @@ test_expect_success 'grep invalidpattern properly dies with grep.patternType=ext
11181118
test_must_fail git -c grep.patterntype=extended grep "a["
11191119
'
11201120

1121-
test_expect_success LIBPCRE 'grep -P invalidpattern properly dies ' '
1121+
test_expect_success PCRE 'grep -P invalidpattern properly dies ' '
11221122
test_must_fail git grep -P "a["
11231123
'
11241124

1125-
test_expect_success LIBPCRE 'grep invalidpattern properly dies with grep.patternType=perl' '
1125+
test_expect_success PCRE 'grep invalidpattern properly dies with grep.patternType=perl' '
11261126
test_must_fail git -c grep.patterntype=perl grep "a["
11271127
'
11281128

@@ -1191,13 +1191,13 @@ test_expect_success 'grep pattern with grep.patternType=fixed, =basic, =perl, =e
11911191
test_cmp expected actual
11921192
'
11931193

1194-
test_expect_success LIBPCRE 'grep -G -F -E -P pattern' '
1194+
test_expect_success PCRE 'grep -G -F -E -P pattern' '
11951195
echo "d0:0" >expected &&
11961196
git grep -G -F -E -P "[\d]" d0 >actual &&
11971197
test_cmp expected actual
11981198
'
11991199

1200-
test_expect_success LIBPCRE 'grep pattern with grep.patternType=fixed, =basic, =extended, =perl' '
1200+
test_expect_success PCRE 'grep pattern with grep.patternType=fixed, =basic, =extended, =perl' '
12011201
echo "d0:0" >expected &&
12021202
git \
12031203
-c grep.patterntype=fixed \
@@ -1208,7 +1208,7 @@ test_expect_success LIBPCRE 'grep pattern with grep.patternType=fixed, =basic, =
12081208
test_cmp expected actual
12091209
'
12101210

1211-
test_expect_success LIBPCRE 'grep -P pattern with grep.patternType=fixed' '
1211+
test_expect_success PCRE 'grep -P pattern with grep.patternType=fixed' '
12121212
echo "ab:a+b*c" >expected &&
12131213
git \
12141214
-c grep.patterntype=fixed \
@@ -1343,12 +1343,12 @@ space: line with leading space2
13431343
space: line with leading space3
13441344
EOF
13451345

1346-
test_expect_success LIBPCRE 'grep -E "^ "' '
1346+
test_expect_success PCRE 'grep -E "^ "' '
13471347
git grep -E "^ " space >actual &&
13481348
test_cmp expected actual
13491349
'
13501350

1351-
test_expect_success LIBPCRE 'grep -P "^ "' '
1351+
test_expect_success PCRE 'grep -P "^ "' '
13521352
git grep -P "^ " space >actual &&
13531353
test_cmp expected actual
13541354
'

t/t7812-grep-icase-non-ascii.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,13 +20,13 @@ test_expect_success REGEX_LOCALE 'grep literal string, no -F' '
2020
git grep -i "TILRAUN: HALLÓ HEIMUR!"
2121
'
2222

23-
test_expect_success GETTEXT_LOCALE,LIBPCRE 'grep pcre utf-8 icase' '
23+
test_expect_success GETTEXT_LOCALE,PCRE 'grep pcre utf-8 icase' '
2424
git grep --perl-regexp "TILRAUN: H.lló Heimur!" &&
2525
git grep --perl-regexp -i "TILRAUN: H.lló Heimur!" &&
2626
git grep --perl-regexp -i "TILRAUN: H.LLÓ HEIMUR!"
2727
'
2828

29-
test_expect_success GETTEXT_LOCALE,LIBPCRE 'grep pcre utf-8 string with "+"' '
29+
test_expect_success GETTEXT_LOCALE,PCRE 'grep pcre utf-8 string with "+"' '
3030
test_write_lines "TILRAUN: Hallóó Heimur!" >file2 &&
3131
git add file2 &&
3232
git grep -l --perl-regexp "TILRAUN: H.lló+ Heimur!" >actual &&

t/t7813-grep-icase-iso.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ test_expect_success GETTEXT_ISO_LOCALE 'setup' '
1111
export LC_ALL
1212
'
1313

14-
test_expect_success GETTEXT_ISO_LOCALE,LIBPCRE 'grep pcre string' '
14+
test_expect_success GETTEXT_ISO_LOCALE,PCRE 'grep pcre string' '
1515
git grep --perl-regexp -i "TILRAUN: H.lló Heimur!" &&
1616
git grep --perl-regexp -i "TILRAUN: H.LLÓ HEIMUR!"
1717
'

t/test-lib.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1010,7 +1010,7 @@ esac
10101010
( COLUMNS=1 && test $COLUMNS = 1 ) && test_set_prereq COLUMNS_CAN_BE_1
10111011
test -z "$NO_PERL" && test_set_prereq PERL
10121012
test -z "$NO_PYTHON" && test_set_prereq PYTHON
1013-
test -n "$USE_LIBPCRE" && test_set_prereq LIBPCRE
1013+
test -n "$USE_LIBPCRE" && test_set_prereq PCRE
10141014
test -z "$NO_GETTEXT" && test_set_prereq GETTEXT
10151015

10161016
# Can we rely on git's output in the C locale?

0 commit comments

Comments
 (0)