1 #include "keychain.h"
2 #include <iostream>
3 
4 #define CATCH_CONFIG_MAIN
5 #include "catch.hpp"
6 
7 TEST_CASE("Keychain", "[keychain]") {
8     Keychain keychain("./demo.agilekeychain", "demo");
9     for (const auto& item : keychain) {
10         std::cout << "Title: " << item.second.title << std::endl
11                   << "UUID: " << item.second.uuid << std::endl
12                   << "Notes: " << item.second.notes << std::endl;
13 
14         for (const auto& section : item.second.sections) {
15             std::cout << "Section: " << section.first << std::endl;
16             for (const auto& field : section.second) {
17                 std::cout << "\t" << field.name << ": " << field.value << std::endl;
18             }
19         }
20     }
21 }
22