jaketmp / ePub-quicklook

NOTE: Not working in Mojave and later! ePub quicklook and spotlight plugins for Mac OS X.
BSD 3-Clause "New" or "Revised" License
570 stars 58 forks source link

Unit-tests needed #11

Closed jaketmp closed 12 years ago

jaketmp commented 12 years ago

The interfaces in JTPepub and ZipArchive need unit-tests.

chrisridd commented 12 years ago

I just pushed a change which adds some tests of JTPepub using the Untitled.epub.

I'm not 100% convinced by it, hence no pull request yet. What do you think?

chrisridd@9b622c617eebfa05ad02339f05ca5ed9b8267b95

chrisridd commented 12 years ago

Ah, I see you've added something too.

Things I'm not sure about:

jaketmp commented 12 years ago

Yeah - this was really just me playing round with the default unit-test target in Xcode, I'd only pushed it up to github because I wanted to put the note listing the UTI fix out there - should really have rolled the unit-test changes back before the sync.

I'm a fair novice at this unit testing stuff - I like the elegance of your approach, but half the point of this project is to force me to keep up-to-date with the intricacies of Xcode, so I may try to learn by doing in the Apple style.

One thing I can see is clear from your code is that the 'untitled.epub' needed an overhaul to account for all the new metadata, which I've now uploaded.

jaketmp commented 12 years ago

Did you create a new scheme to run your unit-tests? It would be good if you could tick 'Shared' under 'Manage Schemes' so it gets included in the commits (or I'm just missing something...)

chrisridd commented 12 years ago

Oh, I'd never noticed that option! OK, I've pushed a commit with that option changed.

chrisridd commented 12 years ago

Xcode doesn't seem to show anything as changed (wrt version control) when you change a scheme. Using "git status" from the command-line is more reliable.

jaketmp commented 12 years ago

I think it's safe to close this now.