assert(rc == 0);
}
+int _test_ndef_for_neo(void)
+{
+ YKP_CONFIG *cfg = ykp_alloc();
+ YK_STATUS *st = _test_init_st(2, 1, 7);
+
+ char *argv[] = {
+ "unittest", "-nhttps://my.yubico.com/neo/",
+ NULL
+ };
+ int argc = 2;
+
+ int rc = _test_config(cfg, st, argc, argv);
+ assert(rc == 1);
+ struct config_st *ycfg = (struct config_st *) ykp_core_config(cfg);
+ assert(((struct ykp_config_t*)cfg)->command == SLOT_NDEF);
+
+ ykp_free_config(cfg);
+ free(st);
+}
+
+int _test_ndef_with_non_neo(void)
+{
+ YKP_CONFIG *cfg = ykp_alloc();
+ YK_STATUS *st = _test_init_st(2, 2, 4);
+
+ char *argv[] = {
+ "unittest", "-nhttps://my.yubico.com/neo/",
+ NULL
+ };
+ int argc = 2;
+
+ int rc = _test_config(cfg, st, argc, argv);
+ assert(rc == 0);
+
+ ykp_free_config(cfg);
+ free(st);
+}
+
+int _test_slot_two_with_neo(void)
+{
+ YKP_CONFIG *cfg = ykp_alloc();
+ YK_STATUS *st = _test_init_st(2, 1, 7);
+
+ char *argv[] = {
+ "unittest", "-2", NULL
+ };
+ int argc = 2;
+
+ int rc = _test_config(cfg, st, argc, argv);
+ assert(rc == 0);
+ ykp_free_config(cfg);
+ free(st);
+}
+
int main (int argc, char **argv)
{
_test_config_slot1();
_test_swap_with_slot();
_test_slot_with_update();
_test_swap_with_update();
+ _test_ndef_for_neo();
+ _test_ndef_with_non_neo();
+ _test_slot_two_with_neo();
return 0;
}