Ignore:
Timestamp:
Dec 20, 2016, 4:07:32 PM (7 years ago)
Author:
Bruno Cornec
Message:

New 3?3 banch for incorporation of latest busybox 1.25. Changing minor version to handle potential incompatibilities.

Location:
branches/3.3
Files:
1 edited
1 copied

Legend:

Unmodified
Added
Removed
  • branches/3.3/mindi-busybox/testsuite/grep.tests

    r3232 r3621  
    8383    "two\nthree\n0\n" "tw\ntwo\nthree\n" "tw.\nthr\n"
    8484
     85# -x (whole line match)
     86testing "grep -x (full match)" "grep -x foo input ; echo \$?" \
     87    "foo\n0\n" "foo\n" ""
     88testing "grep -x (partial match 1)" "grep -x foo input ; echo \$?" \
     89    "1\n" "foo bar\n" ""
     90testing "grep -x (partial match 2)" "grep -x foo input ; echo \$?" \
     91    "1\n" "bar foo\n" ""
     92testing "grep -x -F (full match)" "grep -x -F foo input ; echo \$?" \
     93    "foo\n0\n" "foo\n" ""
     94testing "grep -x -F (partial match 1)" "grep -x -F foo input ; echo \$?" \
     95    "1\n" "foo bar\n" ""
     96testing "grep -x -F (partial match 2)" "grep -x -F foo input ; echo \$?" \
     97    "1\n" "bar foo\n" ""
     98
    8599optional FEATURE_GREP_EGREP_ALIAS
    86100testing "grep -E supports extended regexps" "grep -E fo+" "foo\n" "" \
     
    128142    ""
    129143
     144testing "grep -w doesn't stop on 1st mismatch" \
     145    "grep -w foo input" \
     146    "foop foo\n" \
     147    "foop foo\n" \
     148    ""
     149
     150testing "grep -w ^str doesn't match str not at the beginning" \
     151    "grep -w ^str input" \
     152    "" \
     153    "strstr\n" \
     154    ""
     155
     156testing "grep -w ^ doesn't hang" \
     157    "grep -w ^ input" \
     158    "" \
     159    "anything\n" \
     160    ""
     161
     162testing "grep -w word doesn't match wordword" \
     163    "grep -w word input" \
     164    "" \
     165    "wordword\n" \
     166    ""
     167
     168testing "grep -w word match second word" \
     169    "grep -w word input" \
     170    "bword,word\n""wordb,word\n""bwordb,word\n" \
     171    "bword,word\n""wordb,word\n""bwordb,word\n" \
     172    ""
     173
     174# -r on symlink to dir should recurse into dir
     175mkdir -p grep.testdir/foo
     176echo bar > grep.testdir/foo/file
     177ln -s foo grep.testdir/symfoo
     178testing "grep -r on symlink to dir" \
     179    "grep -r . grep.testdir/symfoo" \
     180    "grep.testdir/symfoo/file:bar\n" \
     181    "" ""
     182rm -Rf grep.testdir
     183
     184# But -r on dir/symlink_to_dir should not recurse into symlink_to_dir
     185mkdir -p grep.testdir/foo
     186echo bar > grep.testdir/foo/file
     187ln -s foo grep.testdir/symfoo
     188testing "grep -r on dir/symlink to dir" \
     189    "grep -r . grep.testdir" \
     190    "grep.testdir/foo/file:bar\n" \
     191    "" ""
     192rm -Rf grep.testdir
     193
    130194# testing "test name" "commands" "expected result" "file input" "stdin"
    131195#   file input will be file called "input"
Note: See TracChangeset for help on using the changeset viewer.