aboutsummaryrefslogtreecommitdiff
path: root/c/test.cpp
diff options
context:
space:
mode:
authorJohn Ankarström <john@ankarstrom.se>2022-08-18 01:53:01 +0200
committerJohn Ankarström <john@ankarstrom.se>2022-08-18 01:53:01 +0200
commit5be94abdbb48cf0aeefe1e55048c90cd065c1486 (patch)
tree58ad4ab035f27811429f68041b5560ad74b5fb16 /c/test.cpp
parenta9a4938f87cb3ce2a0214d45925bcdb4ba8d2a28 (diff)
downloadEpisodeBrowser-5be94abdbb48cf0aeefe1e55048c90cd065c1486.tar.gz
Whatever.
Diffstat (limited to 'c/test.cpp')
-rw-r--r--c/test.cpp27
1 files changed, 26 insertions, 1 deletions
diff --git a/c/test.cpp b/c/test.cpp
index 1054978..4de5578 100644
--- a/c/test.cpp
+++ b/c/test.cpp
@@ -195,6 +195,30 @@ TESTS
}
//DeleteFile(L"tmp.dat");
}
+
+ TEST(DownloadData)
+ {
+ WcharPtr title, wiki, date, source, hint;
+ int i = 1053;
+ /* This is slow. */
+ while(Pl("episode_data","fetch_episode_data",++i,&title,&wiki,&date,&source,&hint)) {
+ extern FileView<ElvDataA> g_fvElv;
+ extern FileView<DlvDataA> g_fvDlv;
+
+ ElvDataA& e = g_fvElv.At(i-1);
+ Wcscpy(e.title, title);
+ if (!e.siEp[0])
+ Swprintf(e.siEp, L"%d", i);
+
+ DlvDataA& d = g_fvDlv.At(i-1);
+ Wcscpy(d.wiki, wiki);
+ Wcscpy(d.date, date);
+ Wcscpy(d.source, source);
+ Wcscpy(d.hint, hint);
+ }
+ extern CfgA& g_cfg;
+ g_cfg.cEp = i;
+ }
};
int RunTests()
@@ -207,7 +231,8 @@ int RunTests()
//MigrateElvDataFromPrologToDisk{},
SampleConfigurationToDisk{},
//MigrateCfg{}
- MigrateDlvDataFromPrologToDisk{},
+ //MigrateDlvDataFromPrologToDisk{},
+ //DownloadData{},
};
printf("Results (%llu tests):\n", sizeof(tests)/sizeof(*tests));