diff --git a/src/Microdown-LaTeXExporter-Tests/ManifestMicrodownLaTeXExporterTests.class.st b/src/Microdown-LaTeXExporter-Tests/ManifestMicrodownLaTeXExporterTests.class.st index c0016f30..1ad16d06 100644 --- a/src/Microdown-LaTeXExporter-Tests/ManifestMicrodownLaTeXExporterTests.class.st +++ b/src/Microdown-LaTeXExporter-Tests/ManifestMicrodownLaTeXExporterTests.class.st @@ -4,7 +4,9 @@ stream nextPutAll: 'Hello world' ``` " Class { - #name : #ManifestMicrodownLaTeXExporterTests, - #superclass : #PackageManifest, - #category : #'Microdown-LaTeXExporter-Tests-Manifest' + #name : 'ManifestMicrodownLaTeXExporterTests', + #superclass : 'PackageManifest', + #category : 'Microdown-LaTeXExporter-Tests-Manifest', + #package : 'Microdown-LaTeXExporter-Tests', + #tag : 'Manifest' } diff --git a/src/Microdown-LaTeXExporter-Tests/MicExportCanvasTest.class.st b/src/Microdown-LaTeXExporter-Tests/MicExportCanvasTest.class.st index 9d746ffa..72433e6f 100644 --- a/src/Microdown-LaTeXExporter-Tests/MicExportCanvasTest.class.st +++ b/src/Microdown-LaTeXExporter-Tests/MicExportCanvasTest.class.st @@ -1,13 +1,14 @@ Class { - #name : #MicExportCanvasTest, - #superclass : #TestCase, + #name : 'MicExportCanvasTest', + #superclass : 'TestCase', #instVars : [ 'canvas' ], - #category : #'Microdown-LaTeXExporter-Tests' + #category : 'Microdown-LaTeXExporter-Tests', + #package : 'Microdown-LaTeXExporter-Tests' } -{ #category : #running } +{ #category : 'running' } MicExportCanvasTest >> setUp [ | stream | super setUp. @@ -15,28 +16,28 @@ MicExportCanvasTest >> setUp [ canvas := MicExportCanvas on: stream. ] -{ #category : #tests } +{ #category : 'tests' } MicExportCanvasTest >> testCrAsNewLine [ canvas crAsNewLine. self assert: canvas stream configuration newLine equals: Character cr ] -{ #category : #tests } +{ #category : 'tests' } MicExportCanvasTest >> testCrlfAsNewLine [ canvas crlfAsNewLine. self assert: canvas stream configuration newLine equals: String crlf ] -{ #category : #tests } +{ #category : 'tests' } MicExportCanvasTest >> testLfAsNewLine [ canvas lfAsNewLine. self assert: canvas stream configuration newLine equals: Character lf ] -{ #category : #tests } +{ #category : 'tests' } MicExportCanvasTest >> testWriteAParagraphWithCr [ canvas crAsNewLine. canvas nextPutAllLines: 'Je ne vois pas pourquoi @@ -47,7 +48,7 @@ car il a etait fait pour cela'. 'car il a etait fait pour cela' ] -{ #category : #tests } +{ #category : 'tests' } MicExportCanvasTest >> testWriteAParagraphWithCrButNewLineIsCrlf [ canvas crlfAsNewLine. canvas nextPutAllLines: 'Je ne vois pas pourquoi @@ -58,7 +59,7 @@ car il a etait fait pour cela'. 'car il a etait fait pour cela' ] -{ #category : #tests } +{ #category : 'tests' } MicExportCanvasTest >> testWriteAParagraphWithCrButNewLineIsLf [ canvas lfAsNewLine. canvas nextPutAllLines: 'Je ne vois pas pourquoi @@ -69,7 +70,7 @@ car il a etait fait pour cela'. 'car il a etait fait pour cela' ] -{ #category : #tests } +{ #category : 'tests' } MicExportCanvasTest >> testWriteAParagraphWithCrlf [ canvas crlfAsNewLine. canvas nextPutAllLines: 'Je ne vois pas pourquoi @@ -80,7 +81,7 @@ car il a etait fait pour cela'. 'car il a etait fait pour cela' ] -{ #category : #tests } +{ #category : 'tests' } MicExportCanvasTest >> testWriteAParagraphWithCrlfButNewLineIsCr [ canvas crAsNewLine. canvas nextPutAllLines: 'Je ne vois pas pourquoi @@ -91,7 +92,7 @@ car il a etait fait pour cela'. 'car il a etait fait pour cela' ] -{ #category : #tests } +{ #category : 'tests' } MicExportCanvasTest >> testWriteAParagraphWithCrlfButNewLineIsLf [ canvas lfAsNewLine. canvas nextPutAllLines: 'Je ne vois pas pourquoi @@ -102,7 +103,7 @@ car il a etait fait pour cela'. 'car il a etait fait pour cela' ] -{ #category : #tests } +{ #category : 'tests' } MicExportCanvasTest >> testWriteAParagraphWithLf [ canvas lfAsNewLine. canvas nextPutAllLines: 'Je ne vois pas pourquoi @@ -113,7 +114,7 @@ car il a etait fait pour cela'. 'car il a etait fait pour cela' ] -{ #category : #tests } +{ #category : 'tests' } MicExportCanvasTest >> testWriteAParagraphWithLfButNewLineIsCr [ canvas crAsNewLine. canvas nextPutAllLines: 'Je ne vois pas pourquoi @@ -124,7 +125,7 @@ car il a etait fait pour cela'. 'car il a etait fait pour cela' ] -{ #category : #tests } +{ #category : 'tests' } MicExportCanvasTest >> testWriteAParagraphWithLfButNewLineIsCrlf [ canvas crlfAsNewLine. canvas nextPutAllLines: 'Je ne vois pas pourquoi diff --git a/src/Microdown-LaTeXExporter-Tests/MicLaTeXWriterTest.class.st b/src/Microdown-LaTeXExporter-Tests/MicLaTeXWriterTest.class.st index 6068a0ae..501d69bb 100644 --- a/src/Microdown-LaTeXExporter-Tests/MicLaTeXWriterTest.class.st +++ b/src/Microdown-LaTeXExporter-Tests/MicLaTeXWriterTest.class.st @@ -1,21 +1,22 @@ Class { - #name : #MicLaTeXWriterTest, - #superclass : #ParametrizedTestCase, + #name : 'MicLaTeXWriterTest', + #superclass : 'ParametrizedTestCase', #instVars : [ 'parser', 'writer', 'factory', 'newLine' ], - #category : #'Microdown-LaTeXExporter-Tests' + #category : 'Microdown-LaTeXExporter-Tests', + #package : 'Microdown-LaTeXExporter-Tests' } -{ #category : #asserting } +{ #category : 'asserting' } MicLaTeXWriterTest class >> shouldInheritSelectors [ ^ true ] -{ #category : #asserting } +{ #category : 'asserting' } MicLaTeXWriterTest class >> testParameters [ ^ ParametrizedTestMatrix new @@ -26,13 +27,13 @@ MicLaTeXWriterTest class >> testParameters [ yourself ] -{ #category : #running } +{ #category : 'running' } MicLaTeXWriterTest >> actualClass [ ^ MicLaTeXWriter ] -{ #category : #helpers } +{ #category : 'helpers' } MicLaTeXWriterTest >> assert: result includesSubstring: expected [ expected ifEmpty: [ ^ self ]. @@ -41,7 +42,7 @@ MicLaTeXWriterTest >> assert: result includesSubstring: expected [ description: ('''{1}'' not in ''{2}''' format: {expected . result}) ] -{ #category : #helpers } +{ #category : 'helpers' } MicLaTeXWriterTest >> assertWriting: aDocumentItem includesText: aString [ | result | self writeForElement: aDocumentItem. @@ -49,7 +50,7 @@ MicLaTeXWriterTest >> assertWriting: aDocumentItem includesText: aString [ self assert: result includesSubstring: aString ] -{ #category : #helpers } +{ #category : 'helpers' } MicLaTeXWriterTest >> assertWriting: aDocumentItem includesTexts: aCollection [ | resultString | self writeForElement: aDocumentItem. @@ -57,12 +58,12 @@ MicLaTeXWriterTest >> assertWriting: aDocumentItem includesTexts: aCollection [ aCollection do: [ :testString | self assert: resultString includesSubstring: testString ] ] -{ #category : #accessing } +{ #category : 'accessing' } MicLaTeXWriterTest >> factory: aFactory [ factory := aFactory new ] -{ #category : #accessing } +{ #category : 'accessing' } MicLaTeXWriterTest >> newLine: aNewLine [ (aNewLine = String cr) ifTrue:[ writer crAsNewLine ]. (aNewLine = String lf) ifTrue:[ writer lfAsNewLine ]. @@ -70,7 +71,7 @@ MicLaTeXWriterTest >> newLine: aNewLine [ newLine := aNewLine ] -{ #category : #'tests - formats' } +{ #category : 'tests - formats' } MicLaTeXWriterTest >> parse: aString andCheckWeGet: aResultingString [ | mic | @@ -79,7 +80,7 @@ MicLaTeXWriterTest >> parse: aString andCheckWeGet: aResultingString [ self assert: writer contents equals: aResultingString ] -{ #category : #'tests - formats' } +{ #category : 'tests - formats' } MicLaTeXWriterTest >> parseInlined: aString andCheckWeGet: aResultingString [ | mic | @@ -88,19 +89,19 @@ MicLaTeXWriterTest >> parseInlined: aString andCheckWeGet: aResultingString [ self assert: writer contents equals: newLine , aResultingString, newLine ] -{ #category : #accessing } +{ #category : 'accessing' } MicLaTeXWriterTest >> parser: aParser [ parser := aParser new ] -{ #category : #tests } +{ #category : 'tests' } MicLaTeXWriterTest >> testAnchor [ self parse: factory anchorSample andCheckWeGet: '\label{test}' ] -{ #category : #tests } +{ #category : 'tests' } MicLaTeXWriterTest >> testAnchorReference [ "Pay attention that an anchor reference only exists within a paragraph and as such a paragraph emit a newline to start." @@ -108,19 +109,19 @@ MicLaTeXWriterTest >> testAnchorReference [ ] -{ #category : #'tests - formats' } +{ #category : 'tests - formats' } MicLaTeXWriterTest >> testBold [ self parseInlined: factory boldFormatSample andCheckWeGet: '\textbf{Foo}' ] -{ #category : #tests } +{ #category : 'tests' } MicLaTeXWriterTest >> testCitation [ self parseInlined: '{!citation|ref=Duca99a!}' andCheckWeGet: '\cite{Duca99a}' ] -{ #category : #tests } +{ #category : 'tests' } MicLaTeXWriterTest >> testCodeblock [ self writeFor: (factory codeblockNoParamBody: 'this is a code'). @@ -129,7 +130,7 @@ MicLaTeXWriterTest >> testCodeblock [ '\end{listing}', newLine ] -{ #category : #tests } +{ #category : 'tests' } MicLaTeXWriterTest >> testCodeblockWithCaption [ self writeFor: (factory codeblock: 'caption=Pharo is **cool**' body: 'this is a code'). @@ -138,7 +139,7 @@ MicLaTeXWriterTest >> testCodeblockWithCaption [ '\end{listing}', newLine ] -{ #category : #tests } +{ #category : 'tests' } MicLaTeXWriterTest >> testCodeblockWithLabel [ self writeFor: (factory codeblock: 'label=Pharo' body: 'this is a code'). @@ -147,21 +148,21 @@ MicLaTeXWriterTest >> testCodeblockWithLabel [ '\end{listing}', newLine ] -{ #category : #'tests - breaklining' } +{ #category : 'tests - breaklining' } MicLaTeXWriterTest >> testCrAsNewLine [ writer crAsNewLine. self assert: writer canvas stream configuration newLine equals: Character cr ] -{ #category : #'tests - breaklining' } +{ #category : 'tests - breaklining' } MicLaTeXWriterTest >> testCrlfAsNewLine [ writer crlfAsNewLine. self assert: writer canvas stream configuration newLine equals: String crlf ] -{ #category : #'tests - figure/link' } +{ #category : 'tests - figure/link' } MicLaTeXWriterTest >> testFigure [ self writeFor: factory figureSample. @@ -174,7 +175,7 @@ MicLaTeXWriterTest >> testFigure [ '\end{figure}', newLine, newLine ] -{ #category : #'tests - figure/link' } +{ #category : 'tests - figure/link' } MicLaTeXWriterTest >> testFigureBold [ self writeFor: factory figureBoldSample. self assert: writer contents equals: newLine, @@ -186,7 +187,7 @@ MicLaTeXWriterTest >> testFigureBold [ '\end{figure}', newLine , newLine ] -{ #category : #'tests - figure/link' } +{ #category : 'tests - figure/link' } MicLaTeXWriterTest >> testFigureRealSample [ self writeFor: factory figureRealSample. @@ -203,91 +204,91 @@ self flag: #todo. ] -{ #category : #tests } +{ #category : 'tests' } MicLaTeXWriterTest >> testFootnote [ self parseInlined: factory footnoteSample andCheckWeGet: '\footnote{Pharo is cool}' ] -{ #category : #'tests - header' } +{ #category : 'tests - header' } MicLaTeXWriterTest >> testHeaderLevel1 [ self parse: factory headerLevel1Sample andCheckWeGet: newLine , '\part{Foo}' ] -{ #category : #'tests - header' } +{ #category : 'tests - header' } MicLaTeXWriterTest >> testHeaderLevel2 [ self parse: factory headerLevel2Sample andCheckWeGet: newLine , '\chapter{Foo}' ] -{ #category : #'tests - header' } +{ #category : 'tests - header' } MicLaTeXWriterTest >> testHeaderLevel3 [ self parse: factory headerLevel3Sample andCheckWeGet: newLine , '\section{Foo}' ] -{ #category : #'tests - header' } +{ #category : 'tests - header' } MicLaTeXWriterTest >> testHeaderLevel4 [ self parse: factory headerLevel4Sample andCheckWeGet: newLine , '\subsection{Foo}' ] -{ #category : #'tests - header' } +{ #category : 'tests - header' } MicLaTeXWriterTest >> testHeaderLevel5 [ self parse: factory headerLevel5Sample andCheckWeGet: newLine , '\subsubsection{Foo}' ] -{ #category : #'tests - header' } +{ #category : 'tests - header' } MicLaTeXWriterTest >> testHeaderLevel6 [ self parse: factory headerLevel6Sample andCheckWeGet: newLine , '\paragraph{Foo}' ] -{ #category : #tests } +{ #category : 'tests' } MicLaTeXWriterTest >> testHorizontalLine [ self parseInlined: factory horizontalLineSample andCheckWeGet: '\rule{\textwidth}{0.1pt}' ] -{ #category : #'tests - formats' } +{ #category : 'tests - formats' } MicLaTeXWriterTest >> testItalic [ self parseInlined: factory italicFormatSample andCheckWeGet: '\textit{Foo}' ] -{ #category : #'tests - breaklining' } +{ #category : 'tests - breaklining' } MicLaTeXWriterTest >> testLfAsNewLine [ writer lfAsNewLine. self assert: writer canvas stream configuration newLine equals: Character lf ] -{ #category : #'tests - figure/link' } +{ #category : 'tests - figure/link' } MicLaTeXWriterTest >> testLink [ self writeFor: factory linkSample. self assert: writer contents equals: newLine, '\href{/anUrl}{Foo}\footnotesize{\url{/anUrl}}', newLine ] -{ #category : #'tests - figure/link' } +{ #category : 'tests - figure/link' } MicLaTeXWriterTest >> testLinkBold [ self writeFor: factory linkBoldSample. self assert: writer contents equals: newLine , - '\href{/anUrl}{\textbf{Foo}}\footnotesize{\url{/anUrl}}', newLine + '\href{/anUrl}{\textbf{Foo}}', newLine ] -{ #category : #'tests - formats' } +{ #category : 'tests - formats' } MicLaTeXWriterTest >> testMonospace [ self parseInlined: factory monospaceFormatSample andCheckWeGet: '\code{Foo}' ] -{ #category : #'tests - lists' } +{ #category : 'tests - lists' } MicLaTeXWriterTest >> testOrderedList [ self writeFor: factory orderedListWithTwoItemsSample. @@ -298,7 +299,7 @@ MicLaTeXWriterTest >> testOrderedList [ '\end{enumerate}', newLine ] -{ #category : #'tests - lists' } +{ #category : 'tests - lists' } MicLaTeXWriterTest >> testOrderedListBold [ self writeFor: factory orderedListWithTwoItemsBoldSample. @@ -309,7 +310,7 @@ MicLaTeXWriterTest >> testOrderedListBold [ '\end{enumerate}', newLine ] -{ #category : #'tests - lists' } +{ #category : 'tests - lists' } MicLaTeXWriterTest >> testOrderedListNested [ self writeFor: factory orderedListWithTwoItemsBoldFirstSample. @@ -320,7 +321,7 @@ MicLaTeXWriterTest >> testOrderedListNested [ '\end{enumerate}', newLine ] -{ #category : #'tests - lists' } +{ #category : 'tests - lists' } MicLaTeXWriterTest >> testOrderedNestedListNested [ self writeFor: factory nestedOrderedListSample. @@ -336,7 +337,7 @@ MicLaTeXWriterTest >> testOrderedNestedListNested [ '\end{itemize}', newLine ] -{ #category : #'tests - lists' } +{ #category : 'tests - lists' } MicLaTeXWriterTest >> testOrderedNestedListNested2 [ self writeFor: factory nestedOrderedList2Sample. @@ -357,7 +358,7 @@ MicLaTeXWriterTest >> testOrderedNestedListNested2 [ '\end{itemize}', newLine ] -{ #category : #'tests - paragraph' } +{ #category : 'tests - paragraph' } MicLaTeXWriterTest >> testParagraph [ self parse: factory paragraphSample andCheckWeGet: newLine, @@ -365,28 +366,28 @@ MicLaTeXWriterTest >> testParagraph [ ] -{ #category : #'tests - paragraph' } +{ #category : 'tests - paragraph' } MicLaTeXWriterTest >> testParagraphLongWithAccents [ self parse: factory paragraphOnMultipleLinesSample andCheckWeGet: newLine, 'Je ne connais pas la peur, car la peur tue l''esprit. La peur est la petite mort qui conduit \`{a} l''oblit\''{e}ration totale. J''affonterai ma peur. Je lui permettrais de passer sur moi, au travers de moi. Et lorsqu''elle sera pass\''{e}e, je tournerai mon oeil interieur sur son chemin. Et l\`{a} o\`{u} elle sera pass\''{e}e, il n''y aura plus rien, rien que moi.', newLine ] -{ #category : #'tests - paragraph' } +{ #category : 'tests - paragraph' } MicLaTeXWriterTest >> testParagraphWithBold [ self parse: factory paragraphBoldSample andCheckWeGet: newLine , 'this is a \textbf{paragraph}', newLine ] -{ #category : #'tests - paragraph' } +{ #category : 'tests - paragraph' } MicLaTeXWriterTest >> testParagraphWithItalic [ self parse: factory paragraphItalicSample andCheckWeGet: newLine , 'this is a \textit{paragraph}', newLine ] -{ #category : #'tests - paragraph' } +{ #category : 'tests - paragraph' } MicLaTeXWriterTest >> testParagraphWithMonospace [ self parse: factory paragraphMonospaceSample andCheckWeGet: newLine , @@ -394,14 +395,14 @@ MicLaTeXWriterTest >> testParagraphWithMonospace [ ] -{ #category : #'tests - paragraph' } +{ #category : 'tests - paragraph' } MicLaTeXWriterTest >> testParagraphWithNested [ self parse: factory paragraphNestedSample andCheckWeGet: newLine , 'this is a \textbf{\textit{paragraph}}', newLine ] -{ #category : #tests } +{ #category : 'tests' } MicLaTeXWriterTest >> testQuote [ self parse: factory quoteSample andCheckWeGet: '\begin{verbatim}', newLine , @@ -409,21 +410,21 @@ MicLaTeXWriterTest >> testQuote [ '\end{verbatim}', newLine ] -{ #category : #'tests - figure/link' } +{ #category : 'tests - figure/link' } MicLaTeXWriterTest >> testRealLinkSample [ self writeFor: factory realLinkSample. self assert: writer contents equals: newLine , -'\href{http://www.pharo.org}{The Pharo Project}\footnotesize{\url{http://www.pharo.org}}', newLine +'\href{http://www.pharo.org}{The Pharo Project}', newLine ] -{ #category : #'tests - formats' } +{ #category : 'tests - formats' } MicLaTeXWriterTest >> testStrike [ self parseInlined: factory strikethroughFormatSample andCheckWeGet: '\sout{Foo}' ] -{ #category : #tests } +{ #category : 'tests' } MicLaTeXWriterTest >> testTable [ self writeFor: factory tableSample. self assert: writer contents equals: newLine, @@ -436,7 +437,7 @@ MicLaTeXWriterTest >> testTable [ '\end{tabular}', newLine ] -{ #category : #tests } +{ #category : 'tests' } MicLaTeXWriterTest >> testTableWhithoutHeader [ self writeFor: (factory simpleTableWithoutHeaderTable). @@ -449,7 +450,7 @@ MicLaTeXWriterTest >> testTableWhithoutHeader [ '\end{tabular}', newLine ] -{ #category : #'tests - lists' } +{ #category : 'tests - lists' } MicLaTeXWriterTest >> testUnorderedList [ self writeFor: factory unorderedListWithTwoItemsSample. @@ -460,7 +461,7 @@ MicLaTeXWriterTest >> testUnorderedList [ '\end{itemize}', newLine ] -{ #category : #'tests - lists' } +{ #category : 'tests - lists' } MicLaTeXWriterTest >> testUnorderedListBold [ self writeFor: factory unorderedListWithTwoItemsBoldSample. @@ -471,7 +472,7 @@ MicLaTeXWriterTest >> testUnorderedListBold [ '\end{itemize}', newLine ] -{ #category : #'tests - lists' } +{ #category : 'tests - lists' } MicLaTeXWriterTest >> testUnorderedListNested [ self writeFor: factory unorderedListWithTwoItemsNestedSample. @@ -482,7 +483,7 @@ MicLaTeXWriterTest >> testUnorderedListNested [ '\end{itemize}', newLine ] -{ #category : #'tests - lists' } +{ #category : 'tests - lists' } MicLaTeXWriterTest >> testUnorderedNestedListNested [ self writeFor: factory nestedUnorderedListSample. @@ -499,7 +500,7 @@ MicLaTeXWriterTest >> testUnorderedNestedListNested [ ] -{ #category : #tests } +{ #category : 'tests' } MicLaTeXWriterTest >> testUrlsAreProtected [ self assert: (writer protectUrl: '#') equals: '\#'. @@ -510,7 +511,7 @@ MicLaTeXWriterTest >> testUrlsAreProtected [ self assert: (writer protectUrl: '\~#%') equals: '\\~\#\%'. ] -{ #category : #'tests - breaklining' } +{ #category : 'tests - breaklining' } MicLaTeXWriterTest >> testWriteAParagraphWithCr [ writer crAsNewLine. writer canvas nextPutAllLines: 'Je ne vois pas pourquoi @@ -521,7 +522,7 @@ car il a etait fait pour cela'. 'car il a etait fait pour cela' ] -{ #category : #'tests - breaklining' } +{ #category : 'tests - breaklining' } MicLaTeXWriterTest >> testWriteAParagraphWithCrButNewLineIsCrlf [ writer crlfAsNewLine. writer canvas nextPutAllLines: 'Je ne vois pas pourquoi @@ -532,7 +533,7 @@ car il a etait fait pour cela'. 'car il a etait fait pour cela' ] -{ #category : #'tests - breaklining' } +{ #category : 'tests - breaklining' } MicLaTeXWriterTest >> testWriteAParagraphWithCrButNewLineIsLf [ writer lfAsNewLine. writer canvas nextPutAllLines: 'Je ne vois pas pourquoi @@ -543,7 +544,7 @@ car il a etait fait pour cela'. 'car il a etait fait pour cela' ] -{ #category : #'tests - breaklining' } +{ #category : 'tests - breaklining' } MicLaTeXWriterTest >> testWriteAParagraphWithCrlf [ writer crlfAsNewLine . writer canvas nextPutAllLines: 'Je ne vois pas pourquoi @@ -554,7 +555,7 @@ car il a etait fait pour cela'. 'car il a etait fait pour cela' ] -{ #category : #'tests - breaklining' } +{ #category : 'tests - breaklining' } MicLaTeXWriterTest >> testWriteAParagraphWithCrlfButNewLineIsCr [ writer crAsNewLine. writer canvas nextPutAllLines: 'Je ne vois pas pourquoi @@ -565,7 +566,7 @@ car il a etait fait pour cela'. 'car il a etait fait pour cela' ] -{ #category : #'tests - breaklining' } +{ #category : 'tests - breaklining' } MicLaTeXWriterTest >> testWriteAParagraphWithCrlfButNewLineIsLf [ writer lfAsNewLine. writer canvas nextPutAllLines: 'Je ne vois pas pourquoi @@ -576,7 +577,7 @@ car il a etait fait pour cela'. 'car il a etait fait pour cela' ] -{ #category : #'tests - breaklining' } +{ #category : 'tests - breaklining' } MicLaTeXWriterTest >> testWriteAParagraphWithLf [ writer lfAsNewLine. writer canvas nextPutAllLines: 'Je ne vois pas pourquoi @@ -587,7 +588,7 @@ car il a etait fait pour cela'. 'car il a etait fait pour cela' ] -{ #category : #'tests - breaklining' } +{ #category : 'tests - breaklining' } MicLaTeXWriterTest >> testWriteAParagraphWithLfButNewLineIsCr [ writer crAsNewLine. writer canvas nextPutAllLines: 'Je ne vois pas pourquoi @@ -598,7 +599,7 @@ car il a etait fait pour cela'. 'car il a etait fait pour cela' ] -{ #category : #'tests - breaklining' } +{ #category : 'tests - breaklining' } MicLaTeXWriterTest >> testWriteAParagraphWithLfButNewLineIsCrlf [ writer crlfAsNewLine. writer canvas nextPutAllLines: 'Je ne vois pas pourquoi @@ -609,7 +610,7 @@ car il a etait fait pour cela'. 'car il a etait fait pour cela' ] -{ #category : #tests } +{ #category : 'tests' } MicLaTeXWriterTest >> writeFor: aString [ | mic | mic := parser parse: aString. @@ -617,14 +618,14 @@ MicLaTeXWriterTest >> writeFor: aString [ ] -{ #category : #tests } +{ #category : 'tests' } MicLaTeXWriterTest >> writeForElement: aNode [ writer visit: aNode. ] -{ #category : #accessing } +{ #category : 'accessing' } MicLaTeXWriterTest >> writer: aWriter [ writer := aWriter new ] diff --git a/src/Microdown-LaTeXExporter-Tests/MicMinimalConfigurationTest.class.st b/src/Microdown-LaTeXExporter-Tests/MicMinimalConfigurationTest.class.st index 36fc68e4..2bcb8df6 100644 --- a/src/Microdown-LaTeXExporter-Tests/MicMinimalConfigurationTest.class.st +++ b/src/Microdown-LaTeXExporter-Tests/MicMinimalConfigurationTest.class.st @@ -1,34 +1,35 @@ Class { - #name : #MicMinimalConfigurationTest, - #superclass : #TestCase, + #name : 'MicMinimalConfigurationTest', + #superclass : 'TestCase', #instVars : [ 'config' ], - #category : #'Microdown-LaTeXExporter-Tests' + #category : 'Microdown-LaTeXExporter-Tests', + #package : 'Microdown-LaTeXExporter-Tests' } -{ #category : #running } +{ #category : 'running' } MicMinimalConfigurationTest >> setUp [ super setUp. config := MicMinimalConfiguration new. ] -{ #category : #tests } +{ #category : 'tests' } MicMinimalConfigurationTest >> testCrAsNewLine [ config crAsNewLine. self assert: config newLine equals: Character cr ] -{ #category : #tests } +{ #category : 'tests' } MicMinimalConfigurationTest >> testCrlfAsNewLine [ config crlfAsNewLine. self assert: config newLine equals: String crlf ] -{ #category : #tests } +{ #category : 'tests' } MicMinimalConfigurationTest >> testLfAsNewLine [ config lfAsNewLine. diff --git a/src/Microdown-LaTeXExporter-Tests/MicOutputStreamTest.class.st b/src/Microdown-LaTeXExporter-Tests/MicOutputStreamTest.class.st index effa15eb..262cc174 100644 --- a/src/Microdown-LaTeXExporter-Tests/MicOutputStreamTest.class.st +++ b/src/Microdown-LaTeXExporter-Tests/MicOutputStreamTest.class.st @@ -1,34 +1,35 @@ Class { - #name : #MicOutputStreamTest, - #superclass : #TestCase, + #name : 'MicOutputStreamTest', + #superclass : 'TestCase', #instVars : [ 'stream' ], - #category : #'Microdown-LaTeXExporter-Tests' + #category : 'Microdown-LaTeXExporter-Tests', + #package : 'Microdown-LaTeXExporter-Tests' } -{ #category : #running } +{ #category : 'running' } MicOutputStreamTest >> setUp [ super setUp. stream := MicOutputStream new. ] -{ #category : #tests } +{ #category : 'tests' } MicOutputStreamTest >> testCrAsNewLine [ stream crAsNewLine. self assert: stream configuration newLine equals: Character cr ] -{ #category : #tests } +{ #category : 'tests' } MicOutputStreamTest >> testCrlfAsNewLine [ stream crlfAsNewLine. self assert: stream configuration newLine equals: String crlf ] -{ #category : #tests } +{ #category : 'tests' } MicOutputStreamTest >> testLfAsNewLine [ stream lfAsNewLine. diff --git a/src/Microdown-LaTeXExporter-Tests/MicSBALaTeXWriterTest.class.st b/src/Microdown-LaTeXExporter-Tests/MicSBALaTeXWriterTest.class.st index 63471fbb..7390a926 100644 --- a/src/Microdown-LaTeXExporter-Tests/MicSBALaTeXWriterTest.class.st +++ b/src/Microdown-LaTeXExporter-Tests/MicSBALaTeXWriterTest.class.st @@ -1,10 +1,11 @@ Class { - #name : #MicSBALaTeXWriterTest, - #superclass : #MicLaTeXWriterTest, - #category : #'Microdown-LaTeXExporter-Tests' + #name : 'MicSBALaTeXWriterTest', + #superclass : 'MicLaTeXWriterTest', + #category : 'Microdown-LaTeXExporter-Tests', + #package : 'Microdown-LaTeXExporter-Tests' } -{ #category : #tests } +{ #category : 'tests' } MicSBALaTeXWriterTest class >> testParameters [ ^ ParametrizedTestMatrix new @@ -15,12 +16,12 @@ MicSBALaTeXWriterTest class >> testParameters [ yourself ] -{ #category : #private } +{ #category : 'private' } MicSBALaTeXWriterTest >> actualClass [ ^ MicSBALaTeXWriter ] -{ #category : #tests } +{ #category : 'tests' } MicSBALaTeXWriterTest >> testCodeblock [ self writeFor: (factory codeblockNoParamBody: 'this is a code'). @@ -29,7 +30,7 @@ MicSBALaTeXWriterTest >> testCodeblock [ '\end{displaycode}', newLine ] -{ #category : #tests } +{ #category : 'tests' } MicSBALaTeXWriterTest >> testCodeblockWithCaption [ self writeFor: (factory codeblock: 'caption=Pharo is **cool**' body: 'this is a code'). @@ -38,7 +39,7 @@ MicSBALaTeXWriterTest >> testCodeblockWithCaption [ '\end{listing}', newLine ] -{ #category : #tests } +{ #category : 'tests' } MicSBALaTeXWriterTest >> testCodeblockWithChevron [ self writeFor: @@ -54,7 +55,7 @@ MicSBALaTeXWriterTest >> testCodeblockWithChevron [ , newLine , '\end{listing}' , newLine ] -{ #category : #tests } +{ #category : 'tests' } MicSBALaTeXWriterTest >> testCodeblockWithLabel [ self writeFor: (factory codeblock: 'label=Pharo' body: 'this is a code'). @@ -63,7 +64,7 @@ MicSBALaTeXWriterTest >> testCodeblockWithLabel [ '\end{listing}', newLine ] -{ #category : #tests } +{ #category : 'tests' } MicSBALaTeXWriterTest >> testFloatingWithBothLabelAndCaption [ | codeBlock | codeBlock := (MicCodeBlock new body: 'foo') @@ -73,7 +74,7 @@ MicSBALaTeXWriterTest >> testFloatingWithBothLabelAndCaption [ self assertWriting: codeBlock includesTexts: #('label=myScript') ] -{ #category : #tests } +{ #category : 'tests' } MicSBALaTeXWriterTest >> testInFlowOnTwoLines [ | codeBlock | codeBlock := MicCodeBlock new body: 'foo', newLine , 'bar on another line'. @@ -84,13 +85,13 @@ MicSBALaTeXWriterTest >> testInFlowOnTwoLines [ '\end{displaycode}', newLine ] -{ #category : #tests } +{ #category : 'tests' } MicSBALaTeXWriterTest >> testMonospace [ self parseInlined: factory monospaceFormatSample andCheckWeGet: '\textcode{Foo}' ] -{ #category : #tests } +{ #category : 'tests' } MicSBALaTeXWriterTest >> testParagraphWithChevron [ self writeFor: (factory textWithChevron). @@ -98,14 +99,14 @@ MicSBALaTeXWriterTest >> testParagraphWithChevron [ 'Pilou \textgreater{}\textgreater{} bla', newLine ] -{ #category : #tests } +{ #category : 'tests' } MicSBALaTeXWriterTest >> testParagraphWithMonospace [ self parse: factory paragraphMonospaceSample andCheckWeGet: newLine, 'this is a \textcode{paragraph}', newLine ] -{ #category : #tests } +{ #category : 'tests' } MicSBALaTeXWriterTest >> testSimpleFloating [ | codeBlock | codeBlock := (MicCodeBlock new body: 'foo') @@ -117,7 +118,7 @@ MicSBALaTeXWriterTest >> testSimpleFloating [ '\end{listing}', newLine ] -{ #category : #tests } +{ #category : 'tests' } MicSBALaTeXWriterTest >> testSimpleFloatingNoLanguage [ | codeBlock | codeBlock := (MicCodeBlock new body: 'foo') @@ -128,7 +129,7 @@ MicSBALaTeXWriterTest >> testSimpleFloatingNoLanguage [ self assertWriting: codeBlock includesText: '{smalltalk}' ] -{ #category : #tests } +{ #category : 'tests' } MicSBALaTeXWriterTest >> testTable [ self writeFor: factory tableSample. self assert: writer contents equals: newLine, @@ -141,7 +142,7 @@ MicSBALaTeXWriterTest >> testTable [ '\end{fullwidthtabular}', newLine ] -{ #category : #tests } +{ #category : 'tests' } MicSBALaTeXWriterTest >> testTableWhithoutHeader [ self writeFor: (factory simpleTableWithoutHeaderTable). diff --git a/src/Microdown-LaTeXExporter-Tests/package.st b/src/Microdown-LaTeXExporter-Tests/package.st index 41cf89c9..07953723 100644 --- a/src/Microdown-LaTeXExporter-Tests/package.st +++ b/src/Microdown-LaTeXExporter-Tests/package.st @@ -1 +1 @@ -Package { #name : #'Microdown-LaTeXExporter-Tests' } +Package { #name : 'Microdown-LaTeXExporter-Tests' } diff --git a/src/Microdown-LaTeXExporter/MicLaTeXWriter.class.st b/src/Microdown-LaTeXExporter/MicLaTeXWriter.class.st index 65b8da1e..d63fbac3 100644 --- a/src/Microdown-LaTeXExporter/MicLaTeXWriter.class.st +++ b/src/Microdown-LaTeXExporter/MicLaTeXWriter.class.st @@ -230,13 +230,11 @@ MicLaTeXWriter >> visitItalic: anItalic [ MicLaTeXWriter >> visitLink: aLink [ | reference | reference := aLink fileStringWithoutHostFile. - "canvas command + canvas command name: 'href'; parameter: reference; - parameter: [ self visitAll: aLink children ]." - canvas command - name: 'footnotesize'; - parameter: [ canvas command name: 'url'; parameter: (self protectUrl: reference) ] + parameter: [ self visitAll: aLink children ]. + ] { #category : 'blocks - list' }