• Home
  • History
  • Annotate
  • Raw
  • Download
  • only in /freebsd-12-stable/usr.bin/truncate/tests/

Lines Matching refs:truncate

54 # truncate utility usage message.
60 "usage: truncate [-c] -s [+|-|%|/]size[K|k|M|m|G|g|T|t] file ..."
61 _custom_create_file print " truncate [-c] -r rfile file ..."
67 atf_set "descr" "Verifies that truncate exits >0 when passed an" \
72 create_stderr_usage_file 'truncate: illegal option -- 7'
75 atf_check -s not-exit:0 -e file:stderr.txt truncate -7 -s0 output.txt
82 atf_set "descr" "Verifies that truncate exits >0 when passed an" \
87 create_stderr_file "truncate: invalid size argument \`+1L'"
90 atf_check -s not-exit:0 -e file:stderr.txt truncate -s+1L output.txt
97 atf_set "descr" "Verifies that truncate exits >0 when passed an" \
102 create_stderr_file "truncate: invalid size argument \`8388608t'"
106 truncate -s8388608t output.txt
117 # No new files and truncate returns 0 as if this is a success.
118 atf_check truncate -c -s 0 doesnotexist.txt
121 atf_check truncate -c -r reference doesnotexist.txt
126 # The existing file will be altered by truncate.
128 atf_check -e file:stderr.txt truncate -c -s1 exists.txt
135 atf_set "descr" "Verifies that truncate command line flags" \
144 atf_check -s not-exit:0 -e file:stderr.txt truncate -s0 -r afile afile
150 atf_set "descr" "Verifies that truncate needs a list of files on" \
158 atf_check -s not-exit:0 -e file:stderr.txt truncate -s1
164 atf_set "descr" "Verifies that truncate detects a non-existent" \
169 create_stderr_file "truncate: afile: No such file or directory"
172 atf_check -s not-exit:0 -e file:stderr.txt truncate -r afile afile
179 atf_set "descr" "Verifies that truncate reports an error during" \
185 create_stderr_file "truncate: exists.txt: Permission denied"
191 atf_check -s not-exit:0 -e file:stderr.txt truncate -s1 exists.txt
197 atf_set "descr" "Verifies truncate can make and grow a new 1m file"
204 atf_check -s exit:0 -e file:stderr.txt truncate -s1k output.txt
212 atf_check -s exit:0 -e file:stderr.txt truncate -c -s1M output.txt
221 atf_set "descr" "Verifies that truncate can make and" \
229 atf_check -s exit:0 -e file:stderr.txt truncate -s1M output.txt
237 atf_check -s exit:0 -e file:stderr.txt truncate -s1k output.txt
246 atf_set "descr" "Verifies truncate can make and grow a new 1m file" \
254 atf_check -s exit:0 -e file:stderr.txt truncate -s+1k output.txt
262 atf_check -s exit:0 -e file:stderr.txt truncate -s+1047552 output.txt
271 atf_set "descr" "Verifies truncate can make and shrink a new 1m file" \
279 atf_check -s exit:0 -e file:stderr.txt truncate -s+1049600 output.txt
287 atf_check -s exit:0 -e file:stderr.txt truncate -s-1M output.txt
296 atf_set "descr" "Verifies truncate handles open failures correctly" \
308 create_stderr_file "truncate: 0000: Permission denied"
312 truncate -c -s1k before 0000 after
324 atf_set "descr" "Verifies that truncate can use a reference file"
336 atf_check -e file:stderr.txt truncate -r reference afile
344 atf_set "descr" "Verifies truncate can make and grow zero byte file"
351 atf_check -s exit:0 -e file:stderr.txt truncate -s0 output.txt
356 atf_check -s exit:0 -e file:stderr.txt truncate -s+0 output.txt
364 atf_set "descr" "Verifies truncate treats negative sizes as zero"
376 atf_check -e file:stderr.txt truncate -s-100 afile
384 atf_set "descr" "Verifies truncate round up"
396 atf_check -e file:stderr.txt truncate -s%100 afile
404 atf_set "descr" "Verifies truncate round down"
416 atf_check -e file:stderr.txt truncate -s/2 afile
424 atf_set "descr" "Verifies truncate round down to zero"
436 atf_check -e file:stderr.txt truncate -s/10 afile