VirtualBox

source: kBuild/vendor/grep/2.12/tests/fgrep-infloop@ 2595

Last change on this file since 2595 was 2595, checked in by bird, 12 years ago

gnu grep version 2.12 (grep-2.12.tar.xz, md5sum=8d2f0346d08b13c18afb81f0e8aa1e2f)

File size: 438 bytes
Line 
1#!/bin/sh
2# This would infloop for grep-2.6.1
3. "${srcdir=.}/init.sh"; path_prepend_ ../src
4
5require_en_utf8_locale_
6require_timeout_
7require_compiled_in_MB_support
8
9encode() { echo "$1" | tr ABC '\357\274\241'; }
10
11fail=0
12
13for LOC in en_US.UTF-8 $LOCALE_FR_UTF8; do
14 out=out1-$LOC
15 encode ABC \
16 | LC_ALL=$LOC timeout 10s grep -F "$(encode BC)" > $out 2>&1
17 test $? = 1 || fail=1
18 compare /dev/null $out || fail=1
19done
20
21Exit $fail
Note: See TracBrowser for help on using the repository browser.

© 2024 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette