summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorRoland Reichwein <mail@reichwein.it>2023-01-29 13:28:05 +0100
committerRoland Reichwein <mail@reichwein.it>2023-01-29 13:28:05 +0100
commitfa0cfcee2c7494e5025f6fb51152352282cbc032 (patch)
treed42d6c75a2f227e38afb4986d1f4a5a955149435
parentf7160a063d5dedd9525b306534109b96087f1896 (diff)
Add test
-rw-r--r--tests/test-diff.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/tests/test-diff.cpp b/tests/test-diff.cpp
index 7061ef0..1704cfd 100644
--- a/tests/test-diff.cpp
+++ b/tests/test-diff.cpp
@@ -116,6 +116,10 @@ TEST_F(DiffTest, constructor)
Diff d{"0abc1", "0abxc1"};
EXPECT_EQ(d.get_xml(), "<diff><start>3</start><end>3</end><data>x</data></diff>");
}
+ {
+ Diff d{"abc", "c"};
+ EXPECT_EQ(d.get_xml(), "<diff><start>0</start><end>2</end><data/></diff>");
+ }
}
TEST_F(DiffTest, diff_create)