diff --git a/source/styles/tests/test_number_format.hpp b/source/styles/tests/test_number_format.hpp
index ec0b127d..df365327 100644
--- a/source/styles/tests/test_number_format.hpp
+++ b/source/styles/tests/test_number_format.hpp
@@ -839,4 +839,10 @@ public:
{
format_and_test(xlnt::number_format::date_dmminus(), {{"13-5", "###########", "0-1", "text"}});
}
+
+ // m-yy
+ void test_builtin_format_date_myminus()
+ {
+ format_and_test(xlnt::number_format::date_myminus(), {{"5-16", "###########", "1-00", "text"}});
+ }
};
diff --git a/source/utils/tests/test_zip_file.hpp b/source/utils/tests/test_zip_file.hpp
index 9e5c2acd..6a4ad4ab 100644
--- a/source/utils/tests/test_zip_file.hpp
+++ b/source/utils/tests/test_zip_file.hpp
@@ -14,7 +14,25 @@ public:
existing_file = path_helper::get_data_directory("/genuine/empty.xlsx");
expected_content_types_string = "\r\n";
expected_atxt_string = "\nThis is cell A1 in Sheet 1This is cell G5";
- expected_printdir_string = " Length Date Time Name\n--------- ---------- ----- ----\n 1704 01/01/1980 00:00 [Content_Types].xml\n 588 01/01/1980 00:00 _rels/.rels\n 1254 01/01/1980 00:00 xl/_rels/workbook.xml.rels\n 898 01/01/1980 00:00 xl/workbook.xml\n 1231 01/01/1980 00:00 xl/worksheets/sheet4.xml\n 4427 01/01/1980 00:00 xl/worksheets/sheet2.xml\n 1032 01/01/1980 00:00 xl/worksheets/sheet3.xml\n 1026 01/01/1980 00:00 xl/worksheets/sheet1.xml\n 6995 01/01/1980 00:00 xl/theme/theme1.xml\n 233 01/01/1980 00:00 xl/sharedStrings.xml\n 1724 01/01/1980 00:00 xl/styles.xml\n 169 01/01/1980 00:00 xl/calcChain.xml\n 917 01/01/1980 00:00 docProps/app.xml\n 609 01/01/1980 00:00 docProps/core.xml\n--------- -------\n 22807 14 files\n";
+ expected_printdir_string =
+ " Length Date Time Name\n"
+ "--------- ---------- ----- ----\n"
+ " 1704 01/01/1980 00:00 [Content_Types].xml\n"
+ " 588 01/01/1980 00:00 _rels/.rels\n"
+ " 917 01/01/1980 00:00 docProps/app.xml\n"
+ " 609 01/01/1980 00:00 docProps/core.xml\n"
+ " 1254 01/01/1980 00:00 xl/_rels/workbook.xml.rels\n"
+ " 169 01/01/1980 00:00 xl/calcChain.xml\n"
+ " 233 01/01/1980 00:00 xl/sharedStrings.xml\n"
+ " 1724 01/01/1980 00:00 xl/styles.xml\n"
+ " 6995 01/01/1980 00:00 xl/theme/theme1.xml\n"
+ " 898 01/01/1980 00:00 xl/workbook.xml\n"
+ " 1068 07/21/2016 20:27 xl/worksheets/sheet1.xml\n"
+ " 4427 01/01/1980 00:00 xl/worksheets/sheet2.xml\n"
+ " 1032 01/01/1980 00:00 xl/worksheets/sheet3.xml\n"
+ " 1231 01/01/1980 00:00 xl/worksheets/sheet4.xml\n"
+ "--------- -------\n"
+ " 22849 14 files\n";
}
void remove_temp_file()
@@ -142,13 +160,13 @@ public:
void test_infolist()
{
xlnt::zip_file f(existing_file);
- TS_ASSERT(f.infolist().size() == 14);
+ TS_ASSERT_EQUALS(f.infolist().size(), 14);
}
void test_namelist()
{
xlnt::zip_file f(existing_file);
- TS_ASSERT(f.namelist().size() == 14);
+ TS_ASSERT_EQUALS(f.namelist().size(), 14);
}
void test_open_by_name()
@@ -205,7 +223,7 @@ public:
std::stringstream ss;
f.printdir(ss);
auto printed = ss.str();
- TS_ASSERT(printed == expected_printdir_string);
+ TS_ASSERT_EQUALS(printed, expected_printdir_string);
}
void test_read()
diff --git a/source/workbook/tests/test_read.hpp b/source/workbook/tests/test_read.hpp
index d214358a..463b7afa 100644
--- a/source/workbook/tests/test_read.hpp
+++ b/source/workbook/tests/test_read.hpp
@@ -554,4 +554,11 @@ public:
TS_ASSERT_THROWS(xlnt::shared_strings_serializer::read_shared_strings(xml_bad, strings), std::runtime_error);
}
+
+ void test_read_inlinestr()
+ {
+ xlnt::workbook wb;
+ wb.load(path_helper::get_data_directory("/genuine/empty.xlsx"));
+ TS_ASSERT_EQUALS(wb.get_sheet_by_index(0).get_cell("A1").get_value(), "This is cell A1 in Sheet 1");
+ }
};
diff --git a/tests/data/genuine/empty.xlsx b/tests/data/genuine/empty.xlsx
index cf6d056b..1b9e826b 100644
Binary files a/tests/data/genuine/empty.xlsx and b/tests/data/genuine/empty.xlsx differ