Files
bash/tests/printf.right

470 lines
6.2 KiB
Plaintext

printf: usage: printf [-v var] format [arguments]
printf: usage: printf [-v var] format [arguments]
./printf.tests: line 46: printf: -x: invalid option
printf: usage: printf [-v var] format [arguments]
./printf.tests: line 49: printf: `invalid-var': not a valid identifier
abc
./printf.tests: line 50: printf: `invalid-var': not a valid identifier
10
one
one\ctwo
4\.2
no newline now newline
%
%
%d
A
unquoted
unquoted quoted
unquoted quoted
this\&that
echo a\\;ls
echo a\'\;ls
echo 'a'\''b'\;ls
\*
\*
1 2 3 4 5
onestring 0 0 0
onestring 0 0 0.00
--4.2 --
--4.2 --
--
^@81--
-- A--
-- A--
A7
A7
A7
A7
A7
--\"abcd\"--
--\'abcd\'--
--a\x--
./printf.tests: line 135: printf: missing hex digit for \x
--\x--
----
----
--4.2
--4\.2--
--\--
4.4BSD
4.4BSD
4.4BSD
4.4BSD
4.4BSD
4.4BSD
4.4BSD
--4.4BSD --
4.
4.4
--4.4BSD --
255 255 255 0377 0xff 0xFF
255 255 255 0377 0xff 0XFF
255 255 255 0377 0xff 0xFF
255 255 255 0377 0xff 0XFF
42
-42
42
-42
4.20
4.20
4.2
4.20
4.20
4.2
4.200000E+00
4.200000e+00
4.2E+00
4.2e+00
4.2
4.2
4.2
4.2
115
115
0163
0163
0x73
0X73
115.00
115.00
-- abcd--
-- abcd--
-- abcdefghij--
-- abcdefghij--
'abcd'
\'abcd\'
\abcd\
\abcd\
26
26
26
./printf.tests: line 259: printf: `%10': missing format character
./printf.tests: line 260: printf: `M': invalid format character
ab./printf.tests: line 263: printf: `y': invalid format character
./printf.tests: line 266: printf: GNU: invalid number
0
./printf.tests: line 267: printf: GNU: invalid number
0
-
(foo )(bar )
0
ab cd ef
13
^G
^G
^@7
^Ge
"?
00001
00001
1
1
0
0
0
0
4
4
4
4
0.000000
0.000000
0.00
0.00
4.000000
4.000000
4.00
4.00
0.000000E+00
0.000000e+00
0.00E+00
0.00e+00
4.000000E+00
4.000000e+00
4.00E+00
4.00e+00
9B3A59A5
q
''
''
s
b
xx
xx
< >< >
0
^@
0
0.00
''
''
9223372036854775807
-9223372036854775808
./printf.tests: line 388: printf: +: invalid number
0
./printf.tests: line 389: printf: z: invalid number
0
./printf.tests: line 390: printf: : invalid number
0
printf1.sub
one
one\ctwo
4\.2
no newline now newline
%
%
%d
A
unquoted
unquoted quoted
unquoted quoted
this\&that
'no-quotes-needed'
'quotes;needed'
1 2 3 4 5
onestring 0 0 0
onestring 0 0 0.00
--4.2 --
--4.2 --
-- A--
-- A--
A7
A7
A7
--\"abcd\"--
--\'abcd\'--
--a\x--
./printf1.sub: line 111: printf: missing hex digit for \x
--\x--
----
----
--4.2
--4\.2--
--\--
4.4BSD
4.4BSD
4.4BSD
4.4BSD
4.4BSD
4.4BSD
4.4BSD
--4.4BSD --
4.
4.4
--4.4BSD --
255 255 255 0377 0xff 0xFF
255 255 255 0377 0xff 0XFF
255 255 255 0377 0xff 0xFF
255 255 255 0377 0xff 0XFF
42
-42
42
-42
4.20
4.20
4.2
4.20
4.20
4.2
4.200000E+00
4.200000e+00
4.2E+00
4.2e+00
4.2
4.2
4.2
4.2
115
115
0163
0163
0x73
0X73
115.00
115.00
-- abcd--
-- abcd--
-- abcdefghij--
-- abcdefghij--
'abcd'
\'abcd\'
\abcd\
\abcd\
26
26
26
./printf1.sub: line 297: printf: `%10': missing format character
./printf1.sub: line 298: printf: `M': invalid format character
./printf1.sub: line 301: printf: `y': invalid format character
./printf1.sub: line 304: printf: GNU: invalid number
0
./printf1.sub: line 306: printf: GNU: invalid number
0
-
(foo )(bar )
0
ab cd ef
13
^G
^G
^Ge
"?
printf2.sub
printf3.sub
16:09:15
./printf3.sub: line 27: printf: warning: `Z': invalid time format specification
%(abde)Z
30-May-2010 16:09:15
05/30/10 15:09:15
current time: 2010-05-30 04:09:15 PM
epoch time: 1969-12-31 07:00:00 PM -0500
random time: 2010-05-30 04:09:15 PM -0400
local time: Sun May 30 16:09:15 EDT 2010
Sun May 30 16:09:15 EDT 2010 date-style time
05/30/10 (foo) 16:09:15 date-style time
printf4.sub
x 123x
x 123x
x 123x
x 123x
x 123x
x 123x
x 123.00x
x 123.00x
x 123.00x
x 123.00x
x123 x
x123 x
x+00001e+02x
x+00001e+02x
x+000000123x
x+000000123x
x+00001e+02x
x+00001e+02x
x +123x
x +123x
x +123x
x +123x
x 7bx
x 7bx
x+123 x
x+123 x
x+123 x
x+123 x
-123.000000
-123.000000
x +123x
x +123x
x +123x
x +123x
printf5.sub
abcd
ab
123
123
173
7b
7B
hello
hello
123
6
123 --
123 --
173 --
7b --
7B --
hello --
hello --
123 --
6 --
printf6.sub
0000000 000
0000001
0000000 000
0000001
0000000 340 262 207 340 262 263 340 262 277 340 262 225 340 263 206 340
0000010 262 227 340 262 263 340 263 201 012
0000019
0000000 340 262 207 340 262 263 012
0000007
0000000 340 262 207 012
0000004
0000000 340 262 207 340 262 263 012
0000007
0000000 040 040 340 262 207 340 262 263 012
0000009
0000000 340 262 207 340 262 263 040 040 055 055 055 012
000000c
0000000 340 262 207 012
0000004
0000000 340 262 207 012
0000004
0000000 340 262 207 012
0000004
0000000 340 262 207 012
0000004
0000000 040 040 040 340 262 207 012
0000007
0000000 340 262 207 040 040 040 055 055 055 012
000000a
[][]
printf7.sub
[]
[X]
VAR=[]
VAR=[X]
[]
[X]
VAR=[]
VAR=[X]
[]
[X]
VAR=[]
VAR=[X]
[]
[X]
VAR=[]
VAR=[X]
XY
XY
printf8.sub
three one
hello world
C B A
D
42 42
three one
four
11
22
A C B
D
A B A
01
01
001
2
01
01
1
1
three one one
four four
0
C A B B A
F D E E D
G H H G
== 6==
== 67==
== 67==
== 67==
====
== 67==
== ==
== 67==
== 7==
== 67==
== 78==
== 67==
== 789==
== 67==
== 789==
== 6==
== 67==
== 67==
==45==
==45==
==45==
== ==
==45==
== 4==
==45==
== 45==
==45==
==456==
==45==
==456==
1 2
A B
1
0001
0001
./printf8.sub: line 87: printf: `$': invalid format character
./printf8.sub: line 89: printf: `$': invalid format character
./printf8.sub: line 92: printf: A: invalid number
01$s B
./printf8.sub: line 95: printf: `$': invalid format character