Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F156863173
D27983.id81704.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
924 B
Referenced Files
None
Subscribers
None
D27983.id81704.diff
View Options
Index: usr.bin/du/tests/du_test.sh
===================================================================
--- usr.bin/du/tests/du_test.sh
+++ usr.bin/du/tests/du_test.sh
@@ -46,15 +46,16 @@
{
local paths1='testdir/A/B testdir/A testdir/C testdir'
local paths2='testdir/A/B testdir/A testdir/C testdir'
- local sep='\n[0-9]+\t'
+ local lineprefix="^[0-9]+$(printf "\t")"
+ local sep="\n${lineprefix}"
atf_check mkdir testdir
atf_check -x "cd testdir && mkdir A && touch A/B && ln -s A C"
atf_check -o save:du.out du -aAH testdir
- atf_check egrep -q "[0-9]+\t$(echo $paths1 | tr ' ' "$sep")\n" du.out
+ atf_check egrep -q "${lineprefix}$(echo $paths1 | sed -e "s/ /$sep/g")" du.out
atf_check -o save:du_C.out du -aAH testdir/C
- atf_check egrep -q "[0-9]+\t$(echo $paths2 | tr ' ' "$sep")\n" du_C.out
+ atf_check egrep -q "${lineprefix}$(echo $paths2 | sed -e "s/ /$sep/g")" du_C.out
}
atf_test_case I_flag
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Sun, May 17, 11:28 PM (12 h, 56 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
33218465
Default Alt Text
D27983.id81704.diff (924 B)
Attached To
Mode
D27983: du: tests: fix the H_flag test (primarily grep usage)
Attached
Detach File
Event Timeline
Log In to Comment