diff options
author | Jonathan White <support@dmapps.us> | 2020-08-26 22:17:31 +0300 |
---|---|---|
committer | Jonathan White <support@dmapps.us> | 2020-12-06 19:16:49 +0300 |
commit | 7ac651763c05daf0d4871abe52aeff903c664178 (patch) | |
tree | 7ad3b3665fc6d30dc45d03b76da88a4042e64fde /tests/TestCli.cpp | |
parent | 3f7e79cdf33876506c4c169828bcfd177a4c97eb (diff) |
Improve CSV export and import capability
* Fixes #3541
* CSV export now includes TOTP settings, Entry Icon (database icon number only), Modified Time, and Created Time.
* CSV import properly understands time in ISO 8601 format and Unix Timestamp.
* CSV import will set the TOTP settings and entry icon based on the chosen column.
Diffstat (limited to 'tests/TestCli.cpp')
-rw-r--r-- | tests/TestCli.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/tests/TestCli.cpp b/tests/TestCli.cpp index 348afb670..80af58bad 100644 --- a/tests/TestCli.cpp +++ b/tests/TestCli.cpp @@ -928,10 +928,10 @@ void TestCli::testExport() setInput("a"); execCmd(exportCmd, {"export", "-f", "csv", m_dbFile->fileName()}); QByteArray csvHeader = m_stdout->readLine(); - QCOMPARE(csvHeader, QByteArray("\"Group\",\"Title\",\"Username\",\"Password\",\"URL\",\"Notes\"\n")); + QVERIFY(csvHeader.contains(QByteArray("\"Group\",\"Title\",\"Username\",\"Password\",\"URL\",\"Notes\""))); QByteArray csvData = m_stdout->readAll(); QVERIFY(csvData.contains(QByteArray( - "\"NewDatabase\",\"Sample Entry\",\"User Name\",\"Password\",\"http://www.somesite.com/\",\"Notes\"\n"))); + "\"NewDatabase\",\"Sample Entry\",\"User Name\",\"Password\",\"http://www.somesite.com/\",\"Notes\""))); // test invalid format setInput("a"); |