Created
December 24, 2009 12:04
-
-
Save samaaron/263163 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
. | |
|-- README | |
|-- lib | |
| |-- iktex | |
| | `-- translator.ik | |
| `-- iktex.ik | |
`-- test | |
|-- ispec_helper.ik | |
`-- unit | |
|-- iktex_spec.ik | |
`-- translator_spec.ik |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
IkTeX = Origin mimic | |
use("iktex/translator") |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
use(System currentDirectory + "/../ispec_helper.ik") | |
describe(IkTeX, | |
it("should have the correct kind", | |
IkTeX should have kind("IkTeX"))) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
System loadPath << System currentDirectory + "/../lib/" | |
use("iktex") | |
use("ispec") |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
IkTeX Translator = Origin mimic do( | |
initialize = method("initialize a new IkTex translater with a given text source", | |
source, | |
@source = source | |
) | |
translate = method("translate the source into LaTeX", | |
@source | |
) | |
) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
use(System currentDirectory + "/../ispec_helper.ik") | |
describe(IkTeX Translator, | |
it("should have the correct kind", | |
IkTeX Translator should have kind("IkTeX Translator")) | |
describe("mimic", | |
it("should be possible to mimic a new IkTeX with a given piece of text", | |
t = IkTeX Translator mimic("text") | |
t should have kind("IkTeX Translator") | |
) | |
) | |
describe("source", | |
it("should be possible to retrieve the original source of text to be translated", | |
t = IkTeX Translator mimic("original source") | |
t source should == "original source" | |
) | |
) | |
) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment