mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2024-11-22 23:50:19 +00:00
AK: Add some tests for hexdump formatting
This commit is contained in:
parent
2fe9c81b30
commit
ac6a3d068d
Notes:
sideshowbarker
2024-07-18 12:07:52 +09:00
Author: https://github.com/alimpfard Commit: https://github.com/SerenityOS/serenity/commit/ac6a3d068d2 Pull-request: https://github.com/SerenityOS/serenity/pull/8106
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…
Reference in a new issue