diff --git a/test/markup/1c/default.expect.txt b/test/markup/1c/default.expect.txt new file mode 100644 index 0000000000..0f51f27c6b --- /dev/null +++ b/test/markup/1c/default.expect.txt @@ -0,0 +1,30 @@ +#ЗагрузитьИзФайла ext_module.txt // директива 7.7 +#Если Клиент ИЛИ НаКлиенте Тогда // инструкции препроцессора + &НаКлиентеНаСервереБезКонтекста // директивы компиляции + Функция ТолстыйКлиентОбычноеПриложение(Знач Параметр1 = Неопределено, // комментарий + Параметр2 = "", ПараметрN = 123.45, ПарамNN) Экспорт // еще комментарий + Попытка + Результат_Булевы_Значения = Новый Структура("П1, П2", Истина, Ложь, NULL, Неопределено); + Перейти ~МеткаGOTO; // комментарий + РезультатТаблицаДат = Новый ТаблицаЗначений; + РезультатТаблицаДат.Колонки.Добавить("Колонка1", + Новый ОписаниеТипов("Дата", , , + Новый КвалификаторыДаты(ЧастиДаты.ДатаВремя)); + НС = РезультатТаблицаДат.Добавить(); НС["Колонка1"] = '20170101120000'); + Исключение + ОписаниеОшибки = ОписаниеОшибки(); // встроенная функция + Масс = Новый Массив; // встроенный тип + Для Каждого Значение Из Масс Цикл + Сообщить(Значение + Символы.ПС + " + |продолжение строки"); // продолжение многострочной строки + Продолжить; Прервать; + КонецЦикла; + СправочникСсылка = Справочники.Языки.НайтиПоНаименованию("ru"); // встроенные типы + СправочникОбъект = СправочникСсылка.ПолучитьОбъект(); + ПеречислениеСсылка = Перечисления.ВидыМодификацииДанных.Изменен; + ВызватьИсключение ОписаниеОшибки; + КонецПопытки; + ~МеткаGOTO: // еще комментарий + ВД = ВидДвиженияБухгалтерии.Дебет; + КонецФункции // ТолстыйКлиентОбычноеПриложение() +#КонецЕсли \ No newline at end of file diff --git a/test/markup/1c/default.txt b/test/markup/1c/default.txt new file mode 100644 index 0000000000..be0d86d009 --- /dev/null +++ b/test/markup/1c/default.txt @@ -0,0 +1,30 @@ +#ЗагрузитьИзФайла ext_module.txt // директива 7.7 +#Если Клиент ИЛИ НаКлиенте Тогда // инструкции препроцессора + &НаКлиентеНаСервереБезКонтекста // директивы компиляции + Функция ТолстыйКлиентОбычноеПриложение(Знач Параметр1 = Неопределено, // комментарий + Параметр2 = "", ПараметрN = 123.45, ПарамNN) Экспорт // еще комментарий + Попытка + Результат_Булевы_Значения = Новый Структура("П1, П2", Истина, Ложь, NULL, Неопределено); + Перейти ~МеткаGOTO; // комментарий + РезультатТаблицаДат = Новый ТаблицаЗначений; + РезультатТаблицаДат.Колонки.Добавить("Колонка1", + Новый ОписаниеТипов("Дата", , , + Новый КвалификаторыДаты(ЧастиДаты.ДатаВремя)); + НС = РезультатТаблицаДат.Добавить(); НС["Колонка1"] = '20170101120000'); + Исключение + ОписаниеОшибки = ОписаниеОшибки(); // встроенная функция + Масс = Новый Массив; // встроенный тип + Для Каждого Значение Из Масс Цикл + Сообщить(Значение + Символы.ПС + " + |продолжение строки"); // продолжение многострочной строки + Продолжить; Прервать; + КонецЦикла; + СправочникСсылка = Справочники.Языки.НайтиПоНаименованию("ru"); // встроенные типы + СправочникОбъект = СправочникСсылка.ПолучитьОбъект(); + ПеречислениеСсылка = Перечисления.ВидыМодификацииДанных.Изменен; + ВызватьИсключение ОписаниеОшибки; + КонецПопытки; + ~МеткаGOTO: // еще комментарий + ВД = ВидДвиженияБухгалтерии.Дебет; + КонецФункции // ТолстыйКлиентОбычноеПриложение() +#КонецЕсли \ No newline at end of file diff --git a/test/markup/ada/default.expect.txt b/test/markup/ada/default.expect.txt new file mode 100644 index 0000000000..0adc8946b3 --- /dev/null +++ b/test/markup/ada/default.expect.txt @@ -0,0 +1,17 @@ +package body Sqlite.Simple is + + Foo : int := int'Size; + Bar : int := long'Size; + + Error_Message_C : chars_ptr := Sqlite_Errstr (Error); + Error_Message : String := Null_Ignore_Value (Error_Message_C); + begin + + Named : for Index in Foo..Bar loop + Put ("Hi[]{}"); + end loop Named; + + Foo := Bar; + end Message; + +end Sqlite.Simple; diff --git a/test/markup/ada/default.txt b/test/markup/ada/default.txt new file mode 100644 index 0000000000..09318ae0ad --- /dev/null +++ b/test/markup/ada/default.txt @@ -0,0 +1,17 @@ +package body Sqlite.Simple is + + Foo : int := int'Size; + Bar : int := long'Size; + + Error_Message_C : chars_ptr := Sqlite_Errstr (Error); + Error_Message : String := Null_Ignore_Value (Error_Message_C); + begin + + Named : for Index in Foo..Bar loop + Put ("Hi[]{}"); + end loop Named; + + Foo := Bar; + end Message; + +end Sqlite.Simple; diff --git a/test/markup/angelscript/default.expect.txt b/test/markup/angelscript/default.expect.txt new file mode 100644 index 0000000000..51207945be --- /dev/null +++ b/test/markup/angelscript/default.expect.txt @@ -0,0 +1,62 @@ +interface IInterface +{ + void DoSomething(); +} + +namespace MyApplication +{ + /* + * This ia a test class. + */ + class SomeClass : IInterface + { + array<float> m_arr; + + array<SomeClass@> m_children; + array<array<SomeClass@>> m_subChildren; // Nested templates + + int m_thing; + + SomeClass() + { + // Add some integers + m_arr.insertLast(1.0f); + m_arr.insertLast(1.75f); + m_arr.insertLast(3.14159f); + uint x = 0x7fff0000; + int y = 9001; + uint z = 0b10101010; + } + + int get_Thing() property { return m_thing; } + void set_Thing(int x) property { m_thing = x; } + + [Hook x=1 y=2] + void DoSomething() + { + print("Something! " + 'stuff.'); + for (uint i = 0; i < m_arr.length(); i++) { + print(" " + i + ": " + m_arr[i]); + } + } + + protected void SomeProtectedFunction() + { + try { + DoSomething(); + } catch { + print("Exception while doing something!"); + } + } + } +} + +void Main() +{ + SomeClass@ c = SomeClass(); + c.DoSomething(); +} + +string multilineString = """ +Hello world, "this is a test"! +"""; diff --git a/test/markup/angelscript/default.txt b/test/markup/angelscript/default.txt new file mode 100644 index 0000000000..e22f5a6151 --- /dev/null +++ b/test/markup/angelscript/default.txt @@ -0,0 +1,62 @@ +interface IInterface +{ + void DoSomething(); +} + +namespace MyApplication +{ + /* + * This ia a test class. + */ + class SomeClass : IInterface + { + array m_arr; + + array m_children; + array> m_subChildren; // Nested templates + + int m_thing; + + SomeClass() + { + // Add some integers + m_arr.insertLast(1.0f); + m_arr.insertLast(1.75f); + m_arr.insertLast(3.14159f); + uint x = 0x7fff0000; + int y = 9001; + uint z = 0b10101010; + } + + int get_Thing() property { return m_thing; } + void set_Thing(int x) property { m_thing = x; } + + [Hook x=1 y=2] + void DoSomething() + { + print("Something! " + 'stuff.'); + for (uint i = 0; i < m_arr.length(); i++) { + print(" " + i + ": " + m_arr[i]); + } + } + + protected void SomeProtectedFunction() + { + try { + DoSomething(); + } catch { + print("Exception while doing something!"); + } + } + } +} + +void Main() +{ + SomeClass@ c = SomeClass(); + c.DoSomething(); +} + +string multilineString = """ +Hello world, "this is a test"! +"""; diff --git a/test/markup/apache/default.expect.txt b/test/markup/apache/default.expect.txt new file mode 100644 index 0000000000..29cd3480e0 --- /dev/null +++ b/test/markup/apache/default.expect.txt @@ -0,0 +1,19 @@ +# rewrite`s rules for wordpress pretty url +LoadModule rewrite_module modules/mod_rewrite.so +RewriteCond %{REQUEST_FILENAME} !-f +RewriteCond %{REQUEST_FILENAME} !-d +RewriteRule . index.php [NC,L] + +ExpiresActive On +ExpiresByType application/x-javascript "access plus 1 days" + +Order Deny,Allow +Allow from All + +<Location /maps/> + RewriteMap map txt:map.txt + RewriteMap lower int:tolower + RewriteCond %{REQUEST_URI} ^/([^/.]+)\.html$ [NC] + RewriteCond ${map:${lower:%1}|NOT_FOUND} !NOT_FOUND + RewriteRule .? /index.php?q=${map:${lower:%1}} [NC,L] +</Location> diff --git a/test/markup/apache/default.txt b/test/markup/apache/default.txt new file mode 100644 index 0000000000..3bf2af4f03 --- /dev/null +++ b/test/markup/apache/default.txt @@ -0,0 +1,19 @@ +# rewrite`s rules for wordpress pretty url +LoadModule rewrite_module modules/mod_rewrite.so +RewriteCond %{REQUEST_FILENAME} !-f +RewriteCond %{REQUEST_FILENAME} !-d +RewriteRule . index.php [NC,L] + +ExpiresActive On +ExpiresByType application/x-javascript "access plus 1 days" + +Order Deny,Allow +Allow from All + + + RewriteMap map txt:map.txt + RewriteMap lower int:tolower + RewriteCond %{REQUEST_URI} ^/([^/.]+)\.html$ [NC] + RewriteCond ${map:${lower:%1}|NOT_FOUND} !NOT_FOUND + RewriteRule .? /index.php?q=${map:${lower:%1}} [NC,L] + diff --git a/test/markup/applescript/default.expect.txt b/test/markup/applescript/default.expect.txt new file mode 100644 index 0000000000..84b65f8e17 --- /dev/null +++ b/test/markup/applescript/default.expect.txt @@ -0,0 +1,14 @@ +repeat 5 times + if foo is greater than bar then + display dialog "Hello there" + else + beep + end if +end repeat + +(* comment (*nested comment*) *) +on do_something(s, y) + return {s + pi, y mod 4} +end do_something + +do shell script "/bin/echo 'hello'" diff --git a/test/markup/applescript/default.txt b/test/markup/applescript/default.txt new file mode 100644 index 0000000000..f0b658be14 --- /dev/null +++ b/test/markup/applescript/default.txt @@ -0,0 +1,14 @@ +repeat 5 times + if foo is greater than bar then + display dialog "Hello there" + else + beep + end if +end repeat + +(* comment (*nested comment*) *) +on do_something(s, y) + return {s + pi, y mod 4} +end do_something + +do shell script "/bin/echo 'hello'" diff --git a/test/markup/asciidoc/default.expect.txt b/test/markup/asciidoc/default.expect.txt new file mode 100644 index 0000000000..a45c4c650e --- /dev/null +++ b/test/markup/asciidoc/default.expect.txt @@ -0,0 +1,65 @@ +Hello, World! +============ +Author Name, <author@domain.foo> + +you can write text http://example.com[with links], optionally +using an explicit link:http://example.com[link prefix]. + +* single quotes around a phrase place 'emphasis' +** alternatively, you can put underlines around a phrase to add _emphasis_ +* astericks around a phrase make the text *bold* +* pluses around a phrase make it +monospaced+ +* `smart' quotes using a leading backtick and trailing single quote +** use two of each for double ``smart'' quotes + +- escape characters are supported +- you can escape a quote inside emphasized text like 'here\'s johnny!' + +term:: definition + another term:: another definition + +// this is just a comment + +Let's make a break. + +''' + +//// +we'll be right with you + +after this brief interruption. +//// + +== We're back! + +Want to see a image::images/tiger.png[Tiger]? + +.Nested highlighting +++++ +<this_is inline="xml"></this_is> +++++ + +____ +asciidoc is so powerful. +____ + +another quote: + +[quote, Sir Arthur Conan Doyle, The Adventures of Sherlock Holmes] +____ +When you have eliminated all which is impossible, then whatever remains, however improbable, must be the truth. +____ + +Getting Literal +--------------- + + want to get literal? prefix a line with a space. + +.... +I'll join that party, too. +.... + +. one thing (yeah!) +. two thing `i can write code`, and `more` wipee! + +NOTE: AsciiDoc is quite cool, you should try it. \ No newline at end of file diff --git a/test/markup/asciidoc/default.txt b/test/markup/asciidoc/default.txt new file mode 100644 index 0000000000..2af6ee6c71 --- /dev/null +++ b/test/markup/asciidoc/default.txt @@ -0,0 +1,65 @@ +Hello, World! +============ +Author Name, + +you can write text http://example.com[with links], optionally +using an explicit link:http://example.com[link prefix]. + +* single quotes around a phrase place 'emphasis' +** alternatively, you can put underlines around a phrase to add _emphasis_ +* astericks around a phrase make the text *bold* +* pluses around a phrase make it +monospaced+ +* `smart' quotes using a leading backtick and trailing single quote +** use two of each for double ``smart'' quotes + +- escape characters are supported +- you can escape a quote inside emphasized text like 'here\'s johnny!' + +term:: definition + another term:: another definition + +// this is just a comment + +Let's make a break. + +''' + +//// +we'll be right with you + +after this brief interruption. +//// + +== We're back! + +Want to see a image::images/tiger.png[Tiger]? + +.Nested highlighting +++++ + +++++ + +____ +asciidoc is so powerful. +____ + +another quote: + +[quote, Sir Arthur Conan Doyle, The Adventures of Sherlock Holmes] +____ +When you have eliminated all which is impossible, then whatever remains, however improbable, must be the truth. +____ + +Getting Literal +--------------- + + want to get literal? prefix a line with a space. + +.... +I'll join that party, too. +.... + +. one thing (yeah!) +. two thing `i can write code`, and `more` wipee! + +NOTE: AsciiDoc is quite cool, you should try it. \ No newline at end of file diff --git a/test/markup/autohotkey/default.expect.txt b/test/markup/autohotkey/default.expect.txt new file mode 100644 index 0000000000..729accdd28 --- /dev/null +++ b/test/markup/autohotkey/default.expect.txt @@ -0,0 +1,24 @@ +; hotkeys and hotstrings +#a::WinSet, AlwaysOnTop, Toggle, A +#Space:: + MsgBox, Percent sign (`%) need to be escaped. + Run "C:\Program Files\some\program.exe" + Gosub, label1 +return +::btw::by the way +; volume +#Numpad8::Send {Volume_Up} +#Numpad5::Send {Volume_Mute} +#Numpad2::Send {Volume_Down} + +label1: + if (Clipboard = "") + { + MsgBox, , Clipboard, Empty! + } + else + { + StringReplace, temp, Clipboard, old, new, All + MsgBox, , Clipboard, %temp% + } +return diff --git a/test/markup/autohotkey/default.txt b/test/markup/autohotkey/default.txt new file mode 100644 index 0000000000..5b4a749945 --- /dev/null +++ b/test/markup/autohotkey/default.txt @@ -0,0 +1,24 @@ +; hotkeys and hotstrings +#a::WinSet, AlwaysOnTop, Toggle, A +#Space:: + MsgBox, Percent sign (`%) need to be escaped. + Run "C:\Program Files\some\program.exe" + Gosub, label1 +return +::btw::by the way +; volume +#Numpad8::Send {Volume_Up} +#Numpad5::Send {Volume_Mute} +#Numpad2::Send {Volume_Down} + +label1: + if (Clipboard = "") + { + MsgBox, , Clipboard, Empty! + } + else + { + StringReplace, temp, Clipboard, old, new, All + MsgBox, , Clipboard, %temp% + } +return diff --git a/test/markup/autoit/default.expect.txt b/test/markup/autoit/default.expect.txt new file mode 100644 index 0000000000..2778a9cbad --- /dev/null +++ b/test/markup/autoit/default.expect.txt @@ -0,0 +1,16 @@ +#NoTrayIcon +#AutoIt3Wrapper_Run_Tidy=Y +#include <Misc.au3> + +_Singleton(@ScriptName) ; Allow only one instance +example(0, 10) + +Func example($min, $max) + For $i = $min To $max + If Mod($i, 2) == 0 Then + MsgBox(64, "Message", $i & ' is even number!') + Else + MsgBox(64, "Message", $i & ' is odd number!') + EndIf + Next +EndFunc ;==>example \ No newline at end of file diff --git a/test/markup/autoit/default.txt b/test/markup/autoit/default.txt new file mode 100644 index 0000000000..7946a548ba --- /dev/null +++ b/test/markup/autoit/default.txt @@ -0,0 +1,16 @@ +#NoTrayIcon +#AutoIt3Wrapper_Run_Tidy=Y +#include + +_Singleton(@ScriptName) ; Allow only one instance +example(0, 10) + +Func example($min, $max) + For $i = $min To $max + If Mod($i, 2) == 0 Then + MsgBox(64, "Message", $i & ' is even number!') + Else + MsgBox(64, "Message", $i & ' is odd number!') + EndIf + Next +EndFunc ;==>example \ No newline at end of file diff --git a/test/markup/avrasm/default.expect.txt b/test/markup/avrasm/default.expect.txt new file mode 100644 index 0000000000..2bf5a6ea7a --- /dev/null +++ b/test/markup/avrasm/default.expect.txt @@ -0,0 +1,19 @@ +;* Title: Block Copy Routines +;* Version: 1.1 + +.include "8515def.inc" + + rjmp RESET ;reset handle + +.def flashsize=r16 ;size of block to be copied + +flash2ram: + lpm ;get constant + st Y+,r0 ;store in SRAM and increment Y-pointer + adiw ZL,1 ;increment Z-pointer + dec flashsize + brne flash2ram ;if not end of table, loop more + ret + +.def ramtemp =r1 ;temporary storage register +.def ramsize =r16 ;size of block to be copied diff --git a/test/markup/avrasm/default.txt b/test/markup/avrasm/default.txt new file mode 100644 index 0000000000..d9fd70e5f3 --- /dev/null +++ b/test/markup/avrasm/default.txt @@ -0,0 +1,19 @@ +;* Title: Block Copy Routines +;* Version: 1.1 + +.include "8515def.inc" + + rjmp RESET ;reset handle + +.def flashsize=r16 ;size of block to be copied + +flash2ram: + lpm ;get constant + st Y+,r0 ;store in SRAM and increment Y-pointer + adiw ZL,1 ;increment Z-pointer + dec flashsize + brne flash2ram ;if not end of table, loop more + ret + +.def ramtemp =r1 ;temporary storage register +.def ramsize =r16 ;size of block to be copied diff --git a/test/markup/awk/default.expect.txt b/test/markup/awk/default.expect.txt new file mode 100644 index 0000000000..a2a0a4f658 --- /dev/null +++ b/test/markup/awk/default.expect.txt @@ -0,0 +1,16 @@ +BEGIN { + POPService = "/inet/tcp/0/emailhost/pop3" + RS = ORS = "\r\n" + print "user name" |& POPService + POPService |& getline + print "pass password" |& POPService + POPService |& getline + print "retr 1" |& POPService + POPService |& getline + if ($1 != "+OK") exit + print "quit" |& POPService + RS = "\r\n\\.\r\n" + POPService |& getline + print $0 + close(POPService) +} diff --git a/test/markup/awk/default.txt b/test/markup/awk/default.txt new file mode 100644 index 0000000000..239869c0a7 --- /dev/null +++ b/test/markup/awk/default.txt @@ -0,0 +1,16 @@ +BEGIN { + POPService = "/inet/tcp/0/emailhost/pop3" + RS = ORS = "\r\n" + print "user name" |& POPService + POPService |& getline + print "pass password" |& POPService + POPService |& getline + print "retr 1" |& POPService + POPService |& getline + if ($1 != "+OK") exit + print "quit" |& POPService + RS = "\r\n\\.\r\n" + POPService |& getline + print $0 + close(POPService) +} diff --git a/test/markup/axapta/default.expect.txt b/test/markup/axapta/default.expect.txt new file mode 100644 index 0000000000..dc645bb496 --- /dev/null +++ b/test/markup/axapta/default.expect.txt @@ -0,0 +1,32 @@ +class ExchRateLoadBatch extends RunBaseBatch { + ExchRateLoad rbc; + container currencies; + boolean actual; + boolean overwrite; + date beg; + date end; + + #define.CurrentVersion(5) + + #localmacro.CurrentList + currencies, + actual, + beg, + end + #endmacro +} + +public boolean unpack(container packedClass) { + container base; + boolean ret; + Integer version = runbase::getVersion(packedClass); + + switch (version) { + case #CurrentVersion: + [version, #CurrentList] = packedClass; + return true; + default: + return false; + } + return ret; +} diff --git a/test/markup/axapta/default.txt b/test/markup/axapta/default.txt new file mode 100644 index 0000000000..100750a804 --- /dev/null +++ b/test/markup/axapta/default.txt @@ -0,0 +1,32 @@ +class ExchRateLoadBatch extends RunBaseBatch { + ExchRateLoad rbc; + container currencies; + boolean actual; + boolean overwrite; + date beg; + date end; + + #define.CurrentVersion(5) + + #localmacro.CurrentList + currencies, + actual, + beg, + end + #endmacro +} + +public boolean unpack(container packedClass) { + container base; + boolean ret; + Integer version = runbase::getVersion(packedClass); + + switch (version) { + case #CurrentVersion: + [version, #CurrentList] = packedClass; + return true; + default: + return false; + } + return ret; +} diff --git a/test/markup/basic/default.expect.txt b/test/markup/basic/default.expect.txt new file mode 100644 index 0000000000..be08210c56 --- /dev/null +++ b/test/markup/basic/default.expect.txt @@ -0,0 +1,22 @@ +10 CLS +20 FOR I = 0 TO 15 +22 FOR J = 0 TO 7 +30 COLOR I,J +40 PRINT " ** "; +45 NEXT J +46 COLOR I,0 +47 GOSUB 100 +48 PRINT +50 NEXT I +60 COLOR 15,0 +99 END +100 FOR T = 65 TO 90 +101 PRINT CHR$(T); +102 NEXT T +103 RETURN +200 REM Data types test +201 TOTAL# = 3.30# 'Double precision variable +202 BALANCE! = 3! 'Single precision variable +203 B2! = 12e5 '120000 +204 ITEMS% = 10 'Integer variable +205 HEXTEST = &H12DB 'Hex value diff --git a/test/markup/basic/default.txt b/test/markup/basic/default.txt new file mode 100644 index 0000000000..04db6debce --- /dev/null +++ b/test/markup/basic/default.txt @@ -0,0 +1,22 @@ +10 CLS +20 FOR I = 0 TO 15 +22 FOR J = 0 TO 7 +30 COLOR I,J +40 PRINT " ** "; +45 NEXT J +46 COLOR I,0 +47 GOSUB 100 +48 PRINT +50 NEXT I +60 COLOR 15,0 +99 END +100 FOR T = 65 TO 90 +101 PRINT CHR$(T); +102 NEXT T +103 RETURN +200 REM Data types test +201 TOTAL# = 3.30# 'Double precision variable +202 BALANCE! = 3! 'Single precision variable +203 B2! = 12e5 '120000 +204 ITEMS% = 10 'Integer variable +205 HEXTEST = &H12DB 'Hex value diff --git a/test/markup/bnf/default.expect.txt b/test/markup/bnf/default.expect.txt new file mode 100644 index 0000000000..57d6610da7 --- /dev/null +++ b/test/markup/bnf/default.expect.txt @@ -0,0 +1,8 @@ +<syntax> ::= <rule> | <rule> <syntax> +<rule> ::= <opt-whitespace> "<" <rule-name> ">" <opt-whitespace> "::=" <opt-whitespace> <expression> <line-end> +<opt-whitespace> ::= " " <opt-whitespace> | "" +<expression> ::= <list> | <list> <opt-whitespace> "|" <opt-whitespace> <expression> +<line-end> ::= <opt-whitespace> <EOL> | <line-end> <line-end> +<list> ::= <term> | <term> <opt-whitespace> <list> +<term> ::= <literal> | "<" <rule-name> ">" +<literal> ::= '"' <text> '"' | "'" <text> "'" diff --git a/test/markup/bnf/default.txt b/test/markup/bnf/default.txt new file mode 100644 index 0000000000..2149c65d22 --- /dev/null +++ b/test/markup/bnf/default.txt @@ -0,0 +1,8 @@ + ::= | + ::= "<" ">" "::=" + ::= " " | "" + ::= | "|" + ::= | + ::= | + ::= | "<" ">" + ::= '"' '"' | "'" "'" diff --git a/test/markup/brainfuck/default.expect.txt b/test/markup/brainfuck/default.expect.txt new file mode 100644 index 0000000000..7ddd595714 --- /dev/null +++ b/test/markup/brainfuck/default.expect.txt @@ -0,0 +1,17 @@ +++++++++++ +[ 3*10 and 10*10 + ->+++>++++++++++<< +]>> +[ filling cells + ->++>>++>++>+>++>>++>++>++>++>++>++>++>++>++>++>++[</]<[<]<[<]>> +]< ++++++++++<< +[ rough codes correction loop + ->>>+>+>+>+++>+>+>+>+>+>+>+>+>+>+>+>+>+>+[<]< +] +more accurate сodes correction +>>>++> +-->+++++++>------>++++++>++>+++++++++>++++++++++>++++++++>--->++++++++++>------>++++++> +++>+++++++++++>++++++++++++>------>+++ +rewind and output +[<]>[.>] diff --git a/test/markup/brainfuck/default.txt b/test/markup/brainfuck/default.txt new file mode 100644 index 0000000000..5156af02e1 --- /dev/null +++ b/test/markup/brainfuck/default.txt @@ -0,0 +1,17 @@ +++++++++++ +[ 3*10 and 10*10 + ->+++>++++++++++<< +]>> +[ filling cells + ->++>>++>++>+>++>>++>++>++>++>++>++>++>++>++>++>++[> +]< ++++++++++<< +[ rough codes correction loop + ->>>+>+>+>+++>+>+>+>+>+>+>+>+>+>+>+>+>+>+[<]< +] +more accurate сodes correction +>>>++> +-->+++++++>------>++++++>++>+++++++++>++++++++++>++++++++>--->++++++++++>------>++++++> +++>+++++++++++>++++++++++++>------>+++ +rewind and output +[<]>[.>] diff --git a/test/markup/cal/default.expect.txt b/test/markup/cal/default.expect.txt new file mode 100644 index 0000000000..20f52bece3 --- /dev/null +++ b/test/markup/cal/default.expect.txt @@ -0,0 +1,33 @@ +OBJECT Codeunit 11 Gen. Jnl.-Check Line +{ + OBJECT-PROPERTIES + { + Date=09-09-14; + Time=12:00:00; + Version List=NAVW18.00; + } + PROPERTIES + { + TableNo=81; + Permissions=TableData 252=rimd; + OnRun=BEGIN + GLSetup.GET; + RunCheck(Rec); + END; + + } + CODE + { + VAR + Text000@1000 : TextConst 'ENU=can only be a closing date for G/L entries'; + Text001@1001 : TextConst 'ENU=is not within your range of allowed posting dates'; + + PROCEDURE ErrorIfPositiveAmt@2(GenJnlLine@1000 : Record 81); + BEGIN + IF GenJnlLine.Amount > 0 THEN + GenJnlLine.FIELDERROR(Amount,Text008); + END; + + LOCAL PROCEDURE CheckGenJnlLineDocType@7(GenJnlLine@1001 : Record 81); + } +} diff --git a/test/markup/cal/default.txt b/test/markup/cal/default.txt new file mode 100644 index 0000000000..5eec86caf0 --- /dev/null +++ b/test/markup/cal/default.txt @@ -0,0 +1,33 @@ +OBJECT Codeunit 11 Gen. Jnl.-Check Line +{ + OBJECT-PROPERTIES + { + Date=09-09-14; + Time=12:00:00; + Version List=NAVW18.00; + } + PROPERTIES + { + TableNo=81; + Permissions=TableData 252=rimd; + OnRun=BEGIN + GLSetup.GET; + RunCheck(Rec); + END; + + } + CODE + { + VAR + Text000@1000 : TextConst 'ENU=can only be a closing date for G/L entries'; + Text001@1001 : TextConst 'ENU=is not within your range of allowed posting dates'; + + PROCEDURE ErrorIfPositiveAmt@2(GenJnlLine@1000 : Record 81); + BEGIN + IF GenJnlLine.Amount > 0 THEN + GenJnlLine.FIELDERROR(Amount,Text008); + END; + + LOCAL PROCEDURE CheckGenJnlLineDocType@7(GenJnlLine@1001 : Record 81); + } +} diff --git a/test/markup/capnproto/default.expect.txt b/test/markup/capnproto/default.expect.txt new file mode 100644 index 0000000000..b516975696 --- /dev/null +++ b/test/markup/capnproto/default.expect.txt @@ -0,0 +1,55 @@ +@0xdbb9ad1f14bf0b36; # unique file ID, generated by `capnp id` + +struct Person { + name @0 :Text; + birthdate @3 :Date; + + email @1 :Text; + phones @2 :List(PhoneNumber); + + struct PhoneNumber { + number @0 :Text; + type @1 :Type; + + enum Type { + mobile @0; + home @1; + work @2; + } + } +} + +struct Date { + year @0 :Int16; + month @1 :UInt8; + day @2 :UInt8; + flags @3 :List(Bool) = [ true, false, false, true ]; +} + +interface Node { + isDirectory @0 () -> (result :Bool); +} + +interface Directory extends(Node) { + list @0 () -> (list: List(Entry)); + struct Entry { + name @0 :Text; + node @1 :Node; + } + + create @1 (name :Text) -> (file :File); + mkdir @2 (name :Text) -> (directory :Directory) + open @3 (name :Text) -> (node :Node); + delete @4 (name :Text); + link @5 (name :Text, node :Node); +} + +interface File extends(Node) { + size @0 () -> (size: UInt64); + read @1 (startAt :UInt64 = 0, amount :UInt64 = 0xffffffffffffffff) + -> (data: Data); + # Default params = read entire file. + + write @2 (startAt :UInt64, data :Data); + truncate @3 (size :UInt64); +} \ No newline at end of file diff --git a/test/markup/capnproto/default.txt b/test/markup/capnproto/default.txt new file mode 100644 index 0000000000..f57fbea093 --- /dev/null +++ b/test/markup/capnproto/default.txt @@ -0,0 +1,55 @@ +@0xdbb9ad1f14bf0b36; # unique file ID, generated by `capnp id` + +struct Person { + name @0 :Text; + birthdate @3 :Date; + + email @1 :Text; + phones @2 :List(PhoneNumber); + + struct PhoneNumber { + number @0 :Text; + type @1 :Type; + + enum Type { + mobile @0; + home @1; + work @2; + } + } +} + +struct Date { + year @0 :Int16; + month @1 :UInt8; + day @2 :UInt8; + flags @3 :List(Bool) = [ true, false, false, true ]; +} + +interface Node { + isDirectory @0 () -> (result :Bool); +} + +interface Directory extends(Node) { + list @0 () -> (list: List(Entry)); + struct Entry { + name @0 :Text; + node @1 :Node; + } + + create @1 (name :Text) -> (file :File); + mkdir @2 (name :Text) -> (directory :Directory) + open @3 (name :Text) -> (node :Node); + delete @4 (name :Text); + link @5 (name :Text, node :Node); +} + +interface File extends(Node) { + size @0 () -> (size: UInt64); + read @1 (startAt :UInt64 = 0, amount :UInt64 = 0xffffffffffffffff) + -> (data: Data); + # Default params = read entire file. + + write @2 (startAt :UInt64, data :Data); + truncate @3 (size :UInt64); +} \ No newline at end of file diff --git a/test/markup/clean/default.expect.txt b/test/markup/clean/default.expect.txt new file mode 100644 index 0000000000..e51ce442b1 --- /dev/null +++ b/test/markup/clean/default.expect.txt @@ -0,0 +1,30 @@ +module fsieve + +import StdClass; // RWS +import StdInt, StdReal + +NrOfPrimes :== 3000 + +primes :: [Int] +primes = pr where pr = [5 : sieve 7 4 pr] + +sieve :: Int !Int [Int] -> [Int] +sieve g i prs +| isPrime prs g (toInt (sqrt (toReal g))) = [g : sieve` g i prs] +| otherwise = sieve (g + i) (6 - i) prs + +sieve` :: Int Int [Int] -> [Int] +sieve` g i prs = sieve (g + i) (6 - i) prs + +isPrime :: [Int] !Int Int -> Bool +isPrime [f:r] pr bd +| f>bd = True +| pr rem f==0 = False +| otherwise = isPrime r pr bd + +select :: [x] Int -> x +select [f:r] 1 = f +select [f:r] n = select r (n - 1) + +Start :: Int +Start = select [2, 3 : primes] NrOfPrimes diff --git a/test/markup/clean/default.txt b/test/markup/clean/default.txt new file mode 100644 index 0000000000..ecbe7b1c7b --- /dev/null +++ b/test/markup/clean/default.txt @@ -0,0 +1,30 @@ +module fsieve + +import StdClass; // RWS +import StdInt, StdReal + +NrOfPrimes :== 3000 + +primes :: [Int] +primes = pr where pr = [5 : sieve 7 4 pr] + +sieve :: Int !Int [Int] -> [Int] +sieve g i prs +| isPrime prs g (toInt (sqrt (toReal g))) = [g : sieve` g i prs] +| otherwise = sieve (g + i) (6 - i) prs + +sieve` :: Int Int [Int] -> [Int] +sieve` g i prs = sieve (g + i) (6 - i) prs + +isPrime :: [Int] !Int Int -> Bool +isPrime [f:r] pr bd +| f>bd = True +| pr rem f==0 = False +| otherwise = isPrime r pr bd + +select :: [x] Int -> x +select [f:r] 1 = f +select [f:r] n = select r (n - 1) + +Start :: Int +Start = select [2, 3 : primes] NrOfPrimes diff --git a/test/markup/cmake/default.expect.txt b/test/markup/cmake/default.expect.txt new file mode 100644 index 0000000000..638923c572 --- /dev/null +++ b/test/markup/cmake/default.expect.txt @@ -0,0 +1,19 @@ +cmake_minimum_required(VERSION 2.8.8) +project(cmake_example) + +# Show message on Linux platform +if (${CMAKE_SYSTEM_NAME} MATCHES Linux) + message("Good choice, bro!") +endif() + +# Tell CMake to run moc when necessary: +set(CMAKE_AUTOMOC ON) +# As moc files are generated in the binary dir, +# tell CMake to always look for includes there: +set(CMAKE_INCLUDE_CURRENT_DIR ON) + +# Widgets finds its own dependencies. +find_package(Qt5Widgets REQUIRED) + +add_executable(myproject main.cpp mainwindow.cpp) +qt5_use_modules(myproject Widgets) diff --git a/test/markup/cmake/default.txt b/test/markup/cmake/default.txt new file mode 100644 index 0000000000..2bbea38c9d --- /dev/null +++ b/test/markup/cmake/default.txt @@ -0,0 +1,19 @@ +cmake_minimum_required(VERSION 2.8.8) +project(cmake_example) + +# Show message on Linux platform +if (${CMAKE_SYSTEM_NAME} MATCHES Linux) + message("Good choice, bro!") +endif() + +# Tell CMake to run moc when necessary: +set(CMAKE_AUTOMOC ON) +# As moc files are generated in the binary dir, +# tell CMake to always look for includes there: +set(CMAKE_INCLUDE_CURRENT_DIR ON) + +# Widgets finds its own dependencies. +find_package(Qt5Widgets REQUIRED) + +add_executable(myproject main.cpp mainwindow.cpp) +qt5_use_modules(myproject Widgets) diff --git a/test/markup/coq/default.expect.txt b/test/markup/coq/default.expect.txt new file mode 100644 index 0000000000..e5b93b13b4 --- /dev/null +++ b/test/markup/coq/default.expect.txt @@ -0,0 +1,41 @@ +Inductive seq : nat -> Set := +| niln : seq 0 +| consn : forall n : nat, nat -> seq n -> seq (S n). + +Fixpoint length (n : nat) (s : seq n) {struct s} : nat := + match s with + | niln => 0 + | consn i _ s' => S (length i s') + end. + +Theorem length_corr : forall (n : nat) (s : seq n), length n s = n. +Proof. + intros n s. + + (* reasoning by induction over s. Then, we have two new goals + corresponding on the case analysis about s (either it is + niln or some consn *) + induction s. + + (* We are in the case where s is void. We can reduce the + term: length 0 niln *) + simpl. + + (* We obtain the goal 0 = 0. *) + trivial. + + (* now, we treat the case s = consn n e s with induction + hypothesis IHs *) + simpl. + + (* The induction hypothesis has type length n s = n. + So we can use it to perform some rewriting in the goal: *) + rewrite IHs. + + (* Now the goal is the trivial equality: S n = S n *) + trivial. + + (* Now all sub cases are closed, we perform the ultimate + step: typing the term built using tactics and save it as + a witness of the theorem. *) +Qed. diff --git a/test/markup/coq/default.txt b/test/markup/coq/default.txt new file mode 100644 index 0000000000..482b23e0eb --- /dev/null +++ b/test/markup/coq/default.txt @@ -0,0 +1,41 @@ +Inductive seq : nat -> Set := +| niln : seq 0 +| consn : forall n : nat, nat -> seq n -> seq (S n). + +Fixpoint length (n : nat) (s : seq n) {struct s} : nat := + match s with + | niln => 0 + | consn i _ s' => S (length i s') + end. + +Theorem length_corr : forall (n : nat) (s : seq n), length n s = n. +Proof. + intros n s. + + (* reasoning by induction over s. Then, we have two new goals + corresponding on the case analysis about s (either it is + niln or some consn *) + induction s. + + (* We are in the case where s is void. We can reduce the + term: length 0 niln *) + simpl. + + (* We obtain the goal 0 = 0. *) + trivial. + + (* now, we treat the case s = consn n e s with induction + hypothesis IHs *) + simpl. + + (* The induction hypothesis has type length n s = n. + So we can use it to perform some rewriting in the goal: *) + rewrite IHs. + + (* Now the goal is the trivial equality: S n = S n *) + trivial. + + (* Now all sub cases are closed, we perform the ultimate + step: typing the term built using tactics and save it as + a witness of the theorem. *) +Qed. diff --git a/test/markup/crmsh/default.expect.txt b/test/markup/crmsh/default.expect.txt new file mode 100644 index 0000000000..205914835d --- /dev/null +++ b/test/markup/crmsh/default.expect.txt @@ -0,0 +1,48 @@ +node webui +node 168633611: node1 +rsc_template web-server apache \ + params port=8000 \ + op monitor interval=10s +# Never use this STONITH agent in production! +primitive development-stonith stonith:null \ + params hostlist="webui node1 node2 node3" +primitive proxy systemd:haproxy \ + op monitor interval=10s +primitive proxy-vip IPaddr2 \ + params ip=10.13.37.20 +primitive srv1 @web-server +primitive srv2 @web-server +primitive test1 Dummy +primitive test2 IPaddr2 \ + params ip=10.13.37.99 +primitive vip1 IPaddr2 \ + params ip=10.13.37.21 \ + op monitor interval=20s +primitive vip2 IPaddr2 \ + params ip=10.13.37.22 \ + op monitor interval=20s +group g-proxy proxy-vip proxy +group g-serv1 vip1 srv1 +group g-serv2 vip2 srv2 +# Never put the two web servers on the same node +colocation co-serv -inf: g-serv1 g-serv2 +# Never put any web server or haproxy on webui +location l-avoid-webui { g-proxy g-serv1 g-serv2 } -inf: webui +# Prever to spread groups across nodes +location l-proxy g-proxy 200: node1 +location l-serv1 g-serv1 200: node2 +location l-serv2 g-serv2 200: node3 +property cib-bootstrap-options: \ + stonith-enabled=true \ + no-quorum-policy=ignore \ + placement-strategy=balanced \ + have-watchdog=false \ + dc-version="1.1.13-1.1.13+git20150827.e8888b9" \ + cluster-infrastructure=corosync \ + cluster-name=hacluster +rsc_defaults rsc-options: \ + resource-stickiness=1 \ + migration-threshold=3 +op_defaults op-options: \ + timeout=600 \ + record-pending=true diff --git a/test/markup/crmsh/default.txt b/test/markup/crmsh/default.txt new file mode 100644 index 0000000000..4e4c286c06 --- /dev/null +++ b/test/markup/crmsh/default.txt @@ -0,0 +1,48 @@ +node webui +node 168633611: node1 +rsc_template web-server apache \ + params port=8000 \ + op monitor interval=10s +# Never use this STONITH agent in production! +primitive development-stonith stonith:null \ + params hostlist="webui node1 node2 node3" +primitive proxy systemd:haproxy \ + op monitor interval=10s +primitive proxy-vip IPaddr2 \ + params ip=10.13.37.20 +primitive srv1 @web-server +primitive srv2 @web-server +primitive test1 Dummy +primitive test2 IPaddr2 \ + params ip=10.13.37.99 +primitive vip1 IPaddr2 \ + params ip=10.13.37.21 \ + op monitor interval=20s +primitive vip2 IPaddr2 \ + params ip=10.13.37.22 \ + op monitor interval=20s +group g-proxy proxy-vip proxy +group g-serv1 vip1 srv1 +group g-serv2 vip2 srv2 +# Never put the two web servers on the same node +colocation co-serv -inf: g-serv1 g-serv2 +# Never put any web server or haproxy on webui +location l-avoid-webui { g-proxy g-serv1 g-serv2 } -inf: webui +# Prever to spread groups across nodes +location l-proxy g-proxy 200: node1 +location l-serv1 g-serv1 200: node2 +location l-serv2 g-serv2 200: node3 +property cib-bootstrap-options: \ + stonith-enabled=true \ + no-quorum-policy=ignore \ + placement-strategy=balanced \ + have-watchdog=false \ + dc-version="1.1.13-1.1.13+git20150827.e8888b9" \ + cluster-infrastructure=corosync \ + cluster-name=hacluster +rsc_defaults rsc-options: \ + resource-stickiness=1 \ + migration-threshold=3 +op_defaults op-options: \ + timeout=600 \ + record-pending=true diff --git a/test/markup/csp/default.expect.txt b/test/markup/csp/default.expect.txt new file mode 100644 index 0000000000..b8f346f918 --- /dev/null +++ b/test/markup/csp/default.expect.txt @@ -0,0 +1,5 @@ +Content-Security-Policy: + default-src 'self'; + style-src 'self' css.example.com; + img-src *.example.com; + script-src 'unsafe-eval' 'self' js.example.com 'nonce-Nc3n83cnSAd3wc3Sasdfn939hc3' diff --git a/test/markup/csp/default.txt b/test/markup/csp/default.txt new file mode 100644 index 0000000000..8e68bad89e --- /dev/null +++ b/test/markup/csp/default.txt @@ -0,0 +1,5 @@ +Content-Security-Policy: + default-src 'self'; + style-src 'self' css.example.com; + img-src *.example.com; + script-src 'unsafe-eval' 'self' js.example.com 'nonce-Nc3n83cnSAd3wc3Sasdfn939hc3' diff --git a/test/markup/d/default.expect.txt b/test/markup/d/default.expect.txt new file mode 100644 index 0000000000..17840372f3 --- /dev/null +++ b/test/markup/d/default.expect.txt @@ -0,0 +1,44 @@ +#!/usr/bin/rdmd +// Computes average line length for standard input. +import std.stdio; + +/+ + this is a /+ nesting +/ comment ++/ + +enum COMPILED_ON = __TIMESTAMP__; // special token + +enum character = '©'; +enum copy_valid = '&copy;'; +enum backslash_escaped = '\\'; + +// string literals +enum str = `hello "world"!`; +enum multiline = r"lorem +ipsum +dolor"; // wysiwyg string, no escapes here allowed +enum multiline2 = "sit +amet +\"adipiscing\" +elit."; +enum hex = x"66 6f 6f"; // same as "foo" + +#line 5 + +// float literals +enum f = [3.14f, .1, 1., 1e100, 0xc0de.01p+100]; + +static if (something == true) { + import std.algorithm; +} + +void main() pure nothrow @safe { + ulong lines = 0; + double sumLength = 0; + foreach (line; stdin.byLine()) { + ++lines; + sumLength += line.length; + } + writeln("Average line length: ", + lines ? sumLength / lines : 0); +} diff --git a/test/markup/d/default.txt b/test/markup/d/default.txt new file mode 100644 index 0000000000..92cc8d84eb --- /dev/null +++ b/test/markup/d/default.txt @@ -0,0 +1,44 @@ +#!/usr/bin/rdmd +// Computes average line length for standard input. +import std.stdio; + +/+ + this is a /+ nesting +/ comment ++/ + +enum COMPILED_ON = __TIMESTAMP__; // special token + +enum character = '©'; +enum copy_valid = '©'; +enum backslash_escaped = '\\'; + +// string literals +enum str = `hello "world"!`; +enum multiline = r"lorem +ipsum +dolor"; // wysiwyg string, no escapes here allowed +enum multiline2 = "sit +amet +\"adipiscing\" +elit."; +enum hex = x"66 6f 6f"; // same as "foo" + +#line 5 + +// float literals +enum f = [3.14f, .1, 1., 1e100, 0xc0de.01p+100]; + +static if (something == true) { + import std.algorithm; +} + +void main() pure nothrow @safe { + ulong lines = 0; + double sumLength = 0; + foreach (line; stdin.byLine()) { + ++lines; + sumLength += line.length; + } + writeln("Average line length: ", + lines ? sumLength / lines : 0); +} diff --git a/test/markup/django/default.expect.txt b/test/markup/django/default.expect.txt new file mode 100644 index 0000000000..da4820d864 --- /dev/null +++ b/test/markup/django/default.expect.txt @@ -0,0 +1,16 @@ +{% if articles|length %} +{% for article in articles %} + +{% custom %} + +{# Striped table #} +<tr class="{% cycle odd,even %}"> + <td>{{ article|default:"Hi... " }}</td> + <td {% if article.today %}class="today"{% endif %}> + Published on {{ article.date }} + </td> +</tr> + +{% endfor %} +{% endif %} + \ No newline at end of file diff --git a/test/markup/django/default.txt b/test/markup/django/default.txt new file mode 100644 index 0000000000..981105ad55 --- /dev/null +++ b/test/markup/django/default.txt @@ -0,0 +1,15 @@ +{% if articles|length %} +{% for article in articles %} + +{% custom %} + +{# Striped table #} + + {{ article|default:"Hi... " }} + + Published on {{ article.date }} + + + +{% endfor %} +{% endif %} diff --git a/test/markup/dns/default.expect.txt b/test/markup/dns/default.expect.txt new file mode 100644 index 0000000000..d302de0777 --- /dev/null +++ b/test/markup/dns/default.expect.txt @@ -0,0 +1,17 @@ +$ORIGIN example.com. ; designates the start of this zone file in the namespace +$TTL 1h ; default expiration time of all resource records without their own TTL value +example.com. IN SOA ns.example.com. username.example.com. ( 2007120710 1d 2h 4w 1h ) +example.com. IN NS ns ; ns.example.com is a nameserver for example.com +example.com. IN NS ns.somewhere.example. ; ns.somewhere.example is a backup nameserver for example.com +example.com. IN MX 10 mail.example.com. ; mail.example.com is the mailserver for example.com +@ IN MX 20 mail2.example.com. ; equivalent to above line, "@" represents zone origin +@ IN MX 50 mail3 ; equivalent to above line, but using a relative host name +example.com. IN A 192.0.2.1 ; IPv4 address for example.com + IN AAAA 2001:db8:10::1 ; IPv6 address for example.com +ns IN A 192.0.2.2 ; IPv4 address for ns.example.com + IN AAAA 2001:db8:10::2 ; IPv6 address for ns.example.com +www IN CNAME example.com. ; www.example.com is an alias for example.com +wwwtest IN CNAME www ; wwwtest.example.com is another alias for www.example.com +mail IN A 192.0.2.3 ; IPv4 address for mail.example.com +mail2 IN A 192.0.2.4 ; IPv4 address for mail2.example.com +mail3 IN A 192.0.2.5 ; IPv4 address for mail3.example.com diff --git a/test/markup/dns/default.txt b/test/markup/dns/default.txt new file mode 100644 index 0000000000..61d27529e1 --- /dev/null +++ b/test/markup/dns/default.txt @@ -0,0 +1,17 @@ +$ORIGIN example.com. ; designates the start of this zone file in the namespace +$TTL 1h ; default expiration time of all resource records without their own TTL value +example.com. IN SOA ns.example.com. username.example.com. ( 2007120710 1d 2h 4w 1h ) +example.com. IN NS ns ; ns.example.com is a nameserver for example.com +example.com. IN NS ns.somewhere.example. ; ns.somewhere.example is a backup nameserver for example.com +example.com. IN MX 10 mail.example.com. ; mail.example.com is the mailserver for example.com +@ IN MX 20 mail2.example.com. ; equivalent to above line, "@" represents zone origin +@ IN MX 50 mail3 ; equivalent to above line, but using a relative host name +example.com. IN A 192.0.2.1 ; IPv4 address for example.com + IN AAAA 2001:db8:10::1 ; IPv6 address for example.com +ns IN A 192.0.2.2 ; IPv4 address for ns.example.com + IN AAAA 2001:db8:10::2 ; IPv6 address for ns.example.com +www IN CNAME example.com. ; www.example.com is an alias for example.com +wwwtest IN CNAME www ; wwwtest.example.com is another alias for www.example.com +mail IN A 192.0.2.3 ; IPv4 address for mail.example.com +mail2 IN A 192.0.2.4 ; IPv4 address for mail2.example.com +mail3 IN A 192.0.2.5 ; IPv4 address for mail3.example.com diff --git a/test/markup/dts/default.expect.txt b/test/markup/dts/default.expect.txt new file mode 100644 index 0000000000..58cc15f829 --- /dev/null +++ b/test/markup/dts/default.expect.txt @@ -0,0 +1,71 @@ +/* + * Copyright (C) 2011 - 2014 Xilinx + * + * This software is licensed under the terms of the GNU General Public + * License version 2, as published by the Free Software Foundation, and + * may be copied, distributed, and modified under those terms. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + */ +/include/ "skeleton.dtsi" + +/ { + compatible = "xlnx,zynq-7000"; + + pmu { + compatible = "arm,cortex-a9-pmu"; + interrupts = <0 5 4>, <0 6 4>; + interrupt-parent = <&intc>; + reg = < 0xf8891000 0x1000 0xf8893000 0x1000 >; + }; + + regulator_vccpint: fixedregulator@0 { + compatible = "regulator-fixed"; + regulator-name = "VCCPINT"; + regulator-min-microvolt = <1000000>; + regulator-max-microvolt = <1000000>; + regulator-boot-on; + regulator-always-on; + }; + + amba: amba { + compatible = "simple-bus"; + #address-cells = <1>; + #size-cells = <1>; + interrupt-parent = <&intc>; + ranges; + + adc: adc@f8007100 { + compatible = "xlnx,zynq-xadc-1.00.a"; + reg = <0xf8007100 0x20>; + interrupts = <0 7 4>; + interrupt-parent = <&intc>; + clocks = <&clkc 12>; + }; + + i2c0: i2c@e0004000 { + compatible = "cdns,i2c-r1p10"; + status = "disabled"; + clocks = <&clkc 38>; + interrupt-parent = <&intc>; + interrupts = <0 25 4>; + reg = <0xe0004000 0x1000>; + #address-cells = <1>; + #size-cells = <0>; + }; + + L2: cache-controller@f8f02000 { + compatible = "arm,pl310-cache"; + reg = <0xF8F02000 0x1000>; + interrupts = <0 2 4>; + arm,data-latency = <3 2 2>; + arm,tag-latency = <2 2 2>; + cache-unified; + cache-level = <2>; + }; + + }; +}; diff --git a/test/markup/dts/default.txt b/test/markup/dts/default.txt new file mode 100644 index 0000000000..807826f9f4 --- /dev/null +++ b/test/markup/dts/default.txt @@ -0,0 +1,71 @@ +/* + * Copyright (C) 2011 - 2014 Xilinx + * + * This software is licensed under the terms of the GNU General Public + * License version 2, as published by the Free Software Foundation, and + * may be copied, distributed, and modified under those terms. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + */ +/include/ "skeleton.dtsi" + +/ { + compatible = "xlnx,zynq-7000"; + + pmu { + compatible = "arm,cortex-a9-pmu"; + interrupts = <0 5 4>, <0 6 4>; + interrupt-parent = <&intc>; + reg = < 0xf8891000 0x1000 0xf8893000 0x1000 >; + }; + + regulator_vccpint: fixedregulator@0 { + compatible = "regulator-fixed"; + regulator-name = "VCCPINT"; + regulator-min-microvolt = <1000000>; + regulator-max-microvolt = <1000000>; + regulator-boot-on; + regulator-always-on; + }; + + amba: amba { + compatible = "simple-bus"; + #address-cells = <1>; + #size-cells = <1>; + interrupt-parent = <&intc>; + ranges; + + adc: adc@f8007100 { + compatible = "xlnx,zynq-xadc-1.00.a"; + reg = <0xf8007100 0x20>; + interrupts = <0 7 4>; + interrupt-parent = <&intc>; + clocks = <&clkc 12>; + }; + + i2c0: i2c@e0004000 { + compatible = "cdns,i2c-r1p10"; + status = "disabled"; + clocks = <&clkc 38>; + interrupt-parent = <&intc>; + interrupts = <0 25 4>; + reg = <0xe0004000 0x1000>; + #address-cells = <1>; + #size-cells = <0>; + }; + + L2: cache-controller@f8f02000 { + compatible = "arm,pl310-cache"; + reg = <0xF8F02000 0x1000>; + interrupts = <0 2 4>; + arm,data-latency = <3 2 2>; + arm,tag-latency = <2 2 2>; + cache-unified; + cache-level = <2>; + }; + + }; +}; diff --git a/test/markup/dust/default.expect.txt b/test/markup/dust/default.expect.txt new file mode 100644 index 0000000000..34ca1941de --- /dev/null +++ b/test/markup/dust/default.expect.txt @@ -0,0 +1,8 @@ +<h3>Hours</h3> + +<ul> + {#users} + <li {hello}>{firstName}</li>{~n} + {/users} +</ul> + \ No newline at end of file diff --git a/test/markup/dust/default.txt b/test/markup/dust/default.txt new file mode 100644 index 0000000000..11bc7eb03f --- /dev/null +++ b/test/markup/dust/default.txt @@ -0,0 +1,7 @@ +

Hours

+ +
    + {#users} +
  • {firstName}
  • {~n} + {/users} +
diff --git a/test/markup/elm/default.expect.txt b/test/markup/elm/default.expect.txt new file mode 100644 index 0000000000..eeacdd7969 --- /dev/null +++ b/test/markup/elm/default.expect.txt @@ -0,0 +1,22 @@ +import Browser +import Html exposing (div, button, text) +import Html.Events exposing (onClick) + +type Msg + = Increment + +main = + Browser.sandbox + { init = 0 + , update = \msg model -> model + 1 + , view = view + } + +view model = + div [] + [ div [] [ text (String.fromInt model) ] + , button [ onClick Increment ] [ text "+" ] + ] + +chars = + String.cons 'C' <| String.cons 'h' <| "ars" diff --git a/test/markup/elm/default.txt b/test/markup/elm/default.txt new file mode 100644 index 0000000000..5d9c384057 --- /dev/null +++ b/test/markup/elm/default.txt @@ -0,0 +1,22 @@ +import Browser +import Html exposing (div, button, text) +import Html.Events exposing (onClick) + +type Msg + = Increment + +main = + Browser.sandbox + { init = 0 + , update = \msg model -> model + 1 + , view = view + } + +view model = + div [] + [ div [] [ text (String.fromInt model) ] + , button [ onClick Increment ] [ text "+" ] + ] + +chars = + String.cons 'C' <| String.cons 'h' <| "ars" diff --git a/test/markup/erb/default.expect.txt b/test/markup/erb/default.expect.txt new file mode 100644 index 0000000000..e50aa3b60b --- /dev/null +++ b/test/markup/erb/default.expect.txt @@ -0,0 +1,11 @@ +<%# this is a comment %> + +<% @posts.each do |post| %> + <p><%= link_to post.title, post %></p> +<% end %> + +<%- available_things = things.select(&:available?) -%> +<%%- x = 1 + 2 -%%> +<%% value = 'real string #{@value}' %%> +<%%= available_things.inspect %%> + \ No newline at end of file diff --git a/test/markup/erb/default.txt b/test/markup/erb/default.txt new file mode 100644 index 0000000000..f7ea6203f5 --- /dev/null +++ b/test/markup/erb/default.txt @@ -0,0 +1,10 @@ +<%# this is a comment %> + +<% @posts.each do |post| %> +

<%= link_to post.title, post %>

+<% end %> + +<%- available_things = things.select(&:available?) -%> +<%%- x = 1 + 2 -%%> +<%% value = 'real string #{@value}' %%> +<%%= available_things.inspect %%> diff --git a/test/markup/erlang-repl/default.expect.txt b/test/markup/erlang-repl/default.expect.txt new file mode 100644 index 0000000000..4ed648e14d --- /dev/null +++ b/test/markup/erlang-repl/default.expect.txt @@ -0,0 +1,27 @@ +1> Str = "abcd". +"abcd" +2> L = test:length(Str). +4 +3> Descriptor = {L, list_to_atom(Str)}. +{4,abcd} +4> L. +4 +5> b(). +Descriptor = {4,abcd} +L = 4 +Str = "abcd" +ok +6> f(L). +ok +7> b(). +Descriptor = {4,abcd} +Str = "abcd" +ok +8> {L, _} = Descriptor. +{4,abcd} +9> L. +4 +10> 2#101. +5 +11> 1.85e+3. +1850 diff --git a/test/markup/erlang-repl/default.txt b/test/markup/erlang-repl/default.txt new file mode 100644 index 0000000000..8f2bef358f --- /dev/null +++ b/test/markup/erlang-repl/default.txt @@ -0,0 +1,27 @@ +1> Str = "abcd". +"abcd" +2> L = test:length(Str). +4 +3> Descriptor = {L, list_to_atom(Str)}. +{4,abcd} +4> L. +4 +5> b(). +Descriptor = {4,abcd} +L = 4 +Str = "abcd" +ok +6> f(L). +ok +7> b(). +Descriptor = {4,abcd} +Str = "abcd" +ok +8> {L, _} = Descriptor. +{4,abcd} +9> L. +4 +10> 2#101. +5 +11> 1.85e+3. +1850 diff --git a/test/markup/fix/default.expect.txt b/test/markup/fix/default.expect.txt new file mode 100644 index 0000000000..855eec184e --- /dev/null +++ b/test/markup/fix/default.expect.txt @@ -0,0 +1,4 @@ +8=FIX.4.29=035=849=SENDERTEST56=TARGETTEST34=0000000152652=20120429-13:30:08.1371=ABC1234511=2012abc123414=10017=20125432120=030=NYSE31=108.2032=10038=10039=240=147=A54=555=BRK59=260=20120429-13:30:08.00065=B76=BROKER84=0100=NYSE111=100150=2151=0167=CS377=N10000=SampleCustomTag10=123 + +8=FIX.4.29=035=849=SENDERTEST56=TARGETTEST34=0000000152652=20120429-13:30:08.1371=ABC1234511=2012abc123414=10017=20125432120=030=NYSE31=108.2032=10038=10039=240=147=A54=555=BRK59=260=20120429-13:30:08.00065=B76=BROKER84=0100=NYSE111=100150=2151=0167=CS377=N10000=SampleCustomTag10=123 + \ No newline at end of file diff --git a/test/markup/fix/default.txt b/test/markup/fix/default.txt new file mode 100644 index 0000000000..e93a625456 --- /dev/null +++ b/test/markup/fix/default.txt @@ -0,0 +1,4 @@ +8=FIX.4.2␁9=0␁35=8␁49=SENDERTEST␁56=TARGETTEST␁34=00000001526␁52=20120429-13:30:08.137␁1=ABC12345␁11=2012abc1234␁14=100␁17=201254321␁20=0␁30=NYSE␁31=108.20␁32=100␁38=100␁39=2␁40=1␁47=A␁54=5␁55=BRK␁59=2␁60=20120429-13:30:08.000␁65=B␁76=BROKER␁84=0␁100=NYSE␁111=100␁150=2␁151=0␁167=CS␁377=N␁10000=SampleCustomTag␁10=123␁ + +8=FIX.4.29=035=849=SENDERTEST56=TARGETTEST34=0000000152652=20120429-13:30:08.1371=ABC1234511=2012abc123414=10017=20125432120=030=NYSE31=108.2032=10038=10039=240=147=A54=555=BRK59=260=20120429-13:30:08.00065=B76=BROKER84=0100=NYSE111=100150=2151=0167=CS377=N10000=SampleCustomTag10=123 + \ No newline at end of file diff --git a/test/markup/flix/default.expect.txt b/test/markup/flix/default.expect.txt new file mode 100644 index 0000000000..dfec7e5cbc --- /dev/null +++ b/test/markup/flix/default.expect.txt @@ -0,0 +1,49 @@ +/** + * An example of Flix for syntax highlighting. + */ + +// Here is a namespace. +namespace a.b.c { + + // Here are some literals. + def b: Bool = true + def c: Char = 'a' + def f: Float = 1.23 + def i: Int = 42 + def s: Str = "string" + + // Here are some relations. + rel LitStm(r: Str, c: Int) + rel AddStm(r: Str, x: Str, y: Str) + rel DivStm(r: Str, x: Str, y: Str) + + // Here is a lattice. + lat LocalVar(k: Str, v: Constant) + + // Here is an index. + index LitStm{{r}, {r, c}} + + // Here is an enum. + enum Constant { + case Top, + + case Cst(Int), + + case Bot + } + + // Here is a function. + def leq(e1: Constant, e2: Constant): Bool = match (e1, e2) with { + case (Constant.Bot, _) => true + case (Constant.Cst(n1), Constant.Cst(n2)) => n1 == n2 + case (_, Constant.Top) => true + case _ => false + } + + // Here are some rules. + LocalVar(r, alpha(c)) :- LitStm(r, c). + + LocalVar(r, sum(v1, v2)) :- AddStm(r, x, y), + LocalVar(x, v1), + LocalVar(y, v2). +} diff --git a/test/markup/flix/default.txt b/test/markup/flix/default.txt new file mode 100644 index 0000000000..77d7f1a42b --- /dev/null +++ b/test/markup/flix/default.txt @@ -0,0 +1,49 @@ +/** + * An example of Flix for syntax highlighting. + */ + +// Here is a namespace. +namespace a.b.c { + + // Here are some literals. + def b: Bool = true + def c: Char = 'a' + def f: Float = 1.23 + def i: Int = 42 + def s: Str = "string" + + // Here are some relations. + rel LitStm(r: Str, c: Int) + rel AddStm(r: Str, x: Str, y: Str) + rel DivStm(r: Str, x: Str, y: Str) + + // Here is a lattice. + lat LocalVar(k: Str, v: Constant) + + // Here is an index. + index LitStm{{r}, {r, c}} + + // Here is an enum. + enum Constant { + case Top, + + case Cst(Int), + + case Bot + } + + // Here is a function. + def leq(e1: Constant, e2: Constant): Bool = match (e1, e2) with { + case (Constant.Bot, _) => true + case (Constant.Cst(n1), Constant.Cst(n2)) => n1 == n2 + case (_, Constant.Top) => true + case _ => false + } + + // Here are some rules. + LocalVar(r, alpha(c)) :- LitStm(r, c). + + LocalVar(r, sum(v1, v2)) :- AddStm(r, x, y), + LocalVar(x, v1), + LocalVar(y, v2). +} diff --git a/test/markup/gams/default.expect.txt b/test/markup/gams/default.expect.txt new file mode 100644 index 0000000000..a0427e94a1 --- /dev/null +++ b/test/markup/gams/default.expect.txt @@ -0,0 +1,31 @@ +SETS + I canning plants / SEATTLE, SAN-DIEGO / + J markets / NEW-YORK, CHICAGO, TOPEKA / ; +PARAMETERS + A(I) capacity of plant i in cases + / SEATTLE 350 + SAN-DIEGO 600 / + B(J) demand at market j in cases + / NEW-YORK 325 + CHICAGO 300 + TOPEKA 275 / ; +TABLE D(I,J) distance in thousands of miles + NEW-YORK CHICAGO TOPEKA + SEATTLE 2.5 1.7 1.8 + SAN-DIEGO 2.5 1.8 1.4 ; +SCALAR F freight in dollars per case per thousand miles /90/ ; +PARAMETER C(I,J) transport cost in thousands of dollars per case ; + C(I,J) = F * D(I,J) / 1000 ; +VARIABLES + X(I,J) shipment quantities in cases + Z total transportation costs in thousands of dollars ; +POSITIVE VARIABLE X ; +EQUATIONS + COST define objective function + SUPPLY(I) observe supply limit at plant i + DEMAND(J) satisfy demand at market j ; +COST .. Z =E= SUM((I,J), C(I,J)*X(I,J)) ; +SUPPLY(I) .. SUM(J, X(I,J)) =L= A(I) ; +DEMAND(J) .. SUM(I, X(I,J)) =G= B(J) ; +MODEL TRANSPORT /ALL/ ; +SOLVE TRANSPORT USING LP MINIMIZING Z ; diff --git a/test/markup/gams/default.txt b/test/markup/gams/default.txt new file mode 100644 index 0000000000..9de006e4d5 --- /dev/null +++ b/test/markup/gams/default.txt @@ -0,0 +1,31 @@ +SETS + I canning plants / SEATTLE, SAN-DIEGO / + J markets / NEW-YORK, CHICAGO, TOPEKA / ; +PARAMETERS + A(I) capacity of plant i in cases + / SEATTLE 350 + SAN-DIEGO 600 / + B(J) demand at market j in cases + / NEW-YORK 325 + CHICAGO 300 + TOPEKA 275 / ; +TABLE D(I,J) distance in thousands of miles + NEW-YORK CHICAGO TOPEKA + SEATTLE 2.5 1.7 1.8 + SAN-DIEGO 2.5 1.8 1.4 ; +SCALAR F freight in dollars per case per thousand miles /90/ ; +PARAMETER C(I,J) transport cost in thousands of dollars per case ; + C(I,J) = F * D(I,J) / 1000 ; +VARIABLES + X(I,J) shipment quantities in cases + Z total transportation costs in thousands of dollars ; +POSITIVE VARIABLE X ; +EQUATIONS + COST define objective function + SUPPLY(I) observe supply limit at plant i + DEMAND(J) satisfy demand at market j ; +COST .. Z =E= SUM((I,J), C(I,J)*X(I,J)) ; +SUPPLY(I) .. SUM(J, X(I,J)) =L= A(I) ; +DEMAND(J) .. SUM(I, X(I,J)) =G= B(J) ; +MODEL TRANSPORT /ALL/ ; +SOLVE TRANSPORT USING LP MINIMIZING Z ; diff --git a/test/markup/gcode/default.expect.txt b/test/markup/gcode/default.expect.txt new file mode 100644 index 0000000000..ad4d148f8c --- /dev/null +++ b/test/markup/gcode/default.expect.txt @@ -0,0 +1,31 @@ +O003 (DIAMOND SQUARE) +N2 G54 G90 G49 G80 +N3 M6 T1 (1.ENDMILL) +N4 M3 S1800 +N5 G0 X-.6 Y2.050 +N6 G43 H1 Z.1 +N7 G1 Z-.3 F50. +N8 G41 D1 Y1.45 +N9 G1 X0 F20. +N10 G2 J-1.45 +(CUTTER COMP CANCEL) +N11 G1 Z-.2 F50. +N12 Y-.990 +N13 G40 +N14 G0 X-.6 Y1.590 +N15 G0 Z.1 +N16 M5 G49 G28 G91 Z0 +N17 CALL O9456 +N18 #500=0.004 +N19 #503=[#500+#501] +N20 VC45=0.0006 +VS4=0.0007 +N21 G90 G10 L20 P3 X5.Y4. Z6.567 +N22 G0 X5000 +N23 IF [#1 LT 0.370] GOTO 49 +N24 X-0.678 Y+.990 +N25 G84.3 X-0.1 +N26 #4=#5*COS[45] +N27 #4=#5*SIN[45] +N28 VZOFZ=652.9658 +% diff --git a/test/markup/gcode/default.txt b/test/markup/gcode/default.txt new file mode 100644 index 0000000000..c2652462c2 --- /dev/null +++ b/test/markup/gcode/default.txt @@ -0,0 +1,31 @@ +O003 (DIAMOND SQUARE) +N2 G54 G90 G49 G80 +N3 M6 T1 (1.ENDMILL) +N4 M3 S1800 +N5 G0 X-.6 Y2.050 +N6 G43 H1 Z.1 +N7 G1 Z-.3 F50. +N8 G41 D1 Y1.45 +N9 G1 X0 F20. +N10 G2 J-1.45 +(CUTTER COMP CANCEL) +N11 G1 Z-.2 F50. +N12 Y-.990 +N13 G40 +N14 G0 X-.6 Y1.590 +N15 G0 Z.1 +N16 M5 G49 G28 G91 Z0 +N17 CALL O9456 +N18 #500=0.004 +N19 #503=[#500+#501] +N20 VC45=0.0006 +VS4=0.0007 +N21 G90 G10 L20 P3 X5.Y4. Z6.567 +N22 G0 X5000 +N23 IF [#1 LT 0.370] GOTO 49 +N24 X-0.678 Y+.990 +N25 G84.3 X-0.1 +N26 #4=#5*COS[45] +N27 #4=#5*SIN[45] +N28 VZOFZ=652.9658 +% diff --git a/test/markup/gherkin/default.expect.txt b/test/markup/gherkin/default.expect.txt new file mode 100644 index 0000000000..2da0e9ddad --- /dev/null +++ b/test/markup/gherkin/default.expect.txt @@ -0,0 +1,25 @@ +# language: en +Feature: Addition + In order to avoid silly mistakes + As a math idiot + I want to be told the sum of two numbers + + @this_is_a_tag + Scenario Outline: Add two numbers + * I have a calculator + Given I have entered <input_1> into the calculator + And I have entered <input_2> into the calculator + When I press <button> + Then the result should be <output> on the screen + And I have a string like + """ + Here is + some + multiline text + """ + + Examples: + | input_1 | input_2 | button | output | + | 20 | 30 | add | 50 | + | 2 | 5 | add | 7 | + | 0 | 40 | add | 40 | diff --git a/test/markup/gherkin/default.txt b/test/markup/gherkin/default.txt new file mode 100644 index 0000000000..52981fd11e --- /dev/null +++ b/test/markup/gherkin/default.txt @@ -0,0 +1,25 @@ +# language: en +Feature: Addition + In order to avoid silly mistakes + As a math idiot + I want to be told the sum of two numbers + + @this_is_a_tag + Scenario Outline: Add two numbers + * I have a calculator + Given I have entered into the calculator + And I have entered into the calculator + When I press