rsrc
rsrc copied to clipboard
Add tests
I think there are some Windows APIs for reading resources from an .exe file on disk. Those could be used to verify that we've built a .syso that results in a correct .exe, with all information in right places. In such case the tests could look like this:
- TestExeLinks — this would:
- run
rsrc -ico ... -manifest ...to create a test.syso file - run
go build dummy.go test.sysoand verify it exits successfully, and that an .exe file was created;
- run
- TestExeRuns — this would execute same code as TestExeLinks, but then would check that the .exe runs successfully and produces some "Hello-world"-like output on stdout.
- TestIco — this would execute TestExeLinks and then try to open it with Windows resources API and check if it contains an icon, and some basic info about this icon.
- TestManifest — similar like TestIco, but would verify manifest, and ideally its contents too.