mirror of
https://github.com/RGBCube/serenity
synced 2025-05-31 11:58:12 +00:00
AK: Add some tests for hexdump formatting
This commit is contained in:
parent
2fe9c81b30
commit
ac6a3d068d
1 changed files with 8 additions and 0 deletions
|
@ -289,3 +289,11 @@ TEST_CASE(long_long_regression)
|
|||
|
||||
EXPECT_EQ(builder.string_view(), "81985529216486895");
|
||||
}
|
||||
|
||||
TEST_CASE(hex_dump)
|
||||
{
|
||||
EXPECT_EQ(String::formatted("{:hex-dump}", "0000"), "30303030");
|
||||
EXPECT_EQ(String::formatted("{:>4hex-dump}", "0000"), "30303030 0000");
|
||||
EXPECT_EQ(String::formatted("{:>2hex-dump}", "0000"), "3030 00\n3030 00");
|
||||
EXPECT_EQ(String::formatted("{:*>4hex-dump}", "0000"), "30303030****0000");
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue