forked from rmyorston/busybox-w32
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
6 changed files
with
135 additions
and
48 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
#!/bin/sh | ||
|
||
# Copyright 2024 by Denys Vlasenko <[email protected]> | ||
# Licensed under GPLv2, see file LICENSE in this source tree. | ||
|
||
. ./testing.sh | ||
|
||
# testing "description" "arguments" "result" "infile" "stdin" | ||
|
||
testing "time -f trailing backslash" \ | ||
"time -f 'abc\' sleep 0 2>&1" \ | ||
'abc?\sleep\n' '' '' | ||
# ^^^^^^^^^^^^^^ this is what GNU time version 1.9 prints | ||
|
||
testing "time -f trailing percent" \ | ||
"time -f 'abc%' sleep 0 2>&1" \ | ||
'abc?' '' '' | ||
|
||
testing "time -f undefined backslash" \ | ||
"time -f 'abc\^def' sleep 0 2>&1" \ | ||
'abc?\^def\n' '' '' | ||
|
||
testing "time -f undefined percent" \ | ||
"time -f 'abc%^def' sleep 0 2>&1" \ | ||
'abc?^def\n' '' '' | ||
|
||
testing "time -f backslash tab and newline" \ | ||
"time -f 'abc\ndef\txyz' sleep 0 2>&1" \ | ||
'abc | ||
def xyz | ||
' '' '' | ||
|
||
testing "time -f percent percent" \ | ||
"time -f 'abc%%def' sleep 0 2>&1" \ | ||
'abc%def\n' '' '' | ||
|
||
exit $FAILCOUNT |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters