mirror of
https://github.com/uutils/coreutils.git
synced 2025-08-19 02:01:34 +00:00
printf: added failing tests on alternative hex form
This commit is contained in:
parent
0071442cba
commit
3b884966ac
1 changed files with 26 additions and 0 deletions
|
@ -639,3 +639,29 @@ fn partial_char() {
|
|||
"printf: warning: bc: character(s) following character constant have been ignored\n",
|
||||
);
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn sub_alternative_lower_hex_0() {
|
||||
new_ucmd!().args(&["%#x", "0"]).succeeds().stdout_only("0");
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn sub_alternative_lower_hex() {
|
||||
new_ucmd!()
|
||||
.args(&["%#x", "42"])
|
||||
.succeeds()
|
||||
.stdout_only("0x2a");
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn sub_alternative_upper_hex_0() {
|
||||
new_ucmd!().args(&["%#X", "0"]).succeeds().stdout_only("0");
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn sub_alternative_upper_hex() {
|
||||
new_ucmd!()
|
||||
.args(&["%#X", "42"])
|
||||
.succeeds()
|
||||
.stdout_only("0x2A");
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue