Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F108642093
D27983.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
897 B
Referenced Files
None
Subscribers
None
D27983.diff
View Options
diff --git a/usr.bin/du/tests/du_test.sh b/usr.bin/du/tests/du_test.sh
--- a/usr.bin/du/tests/du_test.sh
+++ b/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
Tue, Jan 28, 1:16 AM (10 h, 4 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
16232496
Default Alt Text
D27983.diff (897 B)
Attached To
Mode
D27983: du: tests: fix the H_flag test (primarily grep usage)
Attached
Detach File
Event Timeline
Log In to Comment