mirror of
https://github.com/keepassxreboot/keepassxc.git
synced 2025-04-04 04:57:39 +03:00
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.
This commit is contained in:
parent
f49f62d3be
commit
f947c96462
7 changed files with 189 additions and 76 deletions
|
@ -943,10 +943,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");
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue