index.html 3.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116
  1. <!doctype html>
  2. <title>CodeMirror: TTCN-CFG mode</title>
  3. <meta charset="utf-8"/>
  4. <link rel=stylesheet href="../../doc/docs.css">
  5. <link rel="stylesheet" href="../../lib/codemirror.css">
  6. <script src="../../lib/codemirror.js"></script>
  7. <script src="../../addon/edit/matchbrackets.js"></script>
  8. <script src="ttcn-cfg.js"></script>
  9. <style type="text/css">
  10. .CodeMirror {
  11. border-top: 1px solid black;
  12. border-bottom: 1px solid black;
  13. }
  14. </style>
  15. <div id=nav>
  16. <a href="https://codemirror.net"><h1>CodeMirror</h1>
  17. <img id=logo src="../../doc/logo.png">
  18. </a>
  19. <ul>
  20. <li><a href="../../index.html">Home</a>
  21. <li><a href="../../doc/manual.html">Manual</a>
  22. <li><a href="https://github.com/codemirror/codemirror">Code</a>
  23. </ul>
  24. <ul>
  25. <li><a href="../index.html">Language modes</a>
  26. <li><a class=active href="http://en.wikipedia.org/wiki/TTCN">TTCN-CFG</a>
  27. </ul>
  28. </div>
  29. <article>
  30. <h2>TTCN-CFG example</h2>
  31. <div>
  32. <textarea id="ttcn-cfg-code">
  33. [MODULE_PARAMETERS]
  34. # This section shall contain the values of all parameters that are defined in your TTCN-3 modules.
  35. [LOGGING]
  36. # In this section you can specify the name of the log file and the classes of events
  37. # you want to log into the file or display on console (standard error).
  38. LogFile := "logs/%e.%h-%r.%s"
  39. FileMask := LOG_ALL | DEBUG | MATCHING
  40. ConsoleMask := ERROR | WARNING | TESTCASE | STATISTICS | PORTEVENT
  41. LogSourceInfo := Yes
  42. AppendFile := No
  43. TimeStampFormat := DateTime
  44. LogEventTypes := Yes
  45. SourceInfoFormat := Single
  46. LogEntityName := Yes
  47. [TESTPORT_PARAMETERS]
  48. # In this section you can specify parameters that are passed to Test Ports.
  49. [DEFINE]
  50. # In this section you can create macro definitions,
  51. # that can be used in other configuration file sections except [INCLUDE].
  52. [INCLUDE]
  53. # To use configuration settings given in other configuration files,
  54. # the configuration files just need to be listed in this section, with their full or relative pathnames.
  55. [EXTERNAL_COMMANDS]
  56. # This section can define external commands (shell scripts) to be executed by the ETS
  57. # whenever a control part or test case is started or terminated.
  58. BeginTestCase := ""
  59. EndTestCase := ""
  60. BeginControlPart := ""
  61. EndControlPart := ""
  62. [EXECUTE]
  63. # In this section you can specify what parts of your test suite you want to execute.
  64. [GROUPS]
  65. # In this section you can specify groups of hosts. These groups can be used inside the
  66. # [COMPONENTS] section to restrict the creation of certain PTCs to a given set of hosts.
  67. [COMPONENTS]
  68. # This section consists of rules restricting the location of created PTCs.
  69. [MAIN_CONTROLLER]
  70. # The options herein control the behavior of MC.
  71. TCPPort := 0
  72. KillTimer := 10.0
  73. NumHCs := 0
  74. LocalAddress :=
  75. </textarea>
  76. </div>
  77. <script>
  78. var ttcnEditor = CodeMirror.fromTextArea(document.getElementById("ttcn-cfg-code"), {
  79. lineNumbers: true,
  80. matchBrackets: true,
  81. mode: "text/x-ttcn-cfg"
  82. });
  83. ttcnEditor.setSize(600, 860);
  84. var mac = CodeMirror.keyMap.default == CodeMirror.keyMap.macDefault;
  85. CodeMirror.keyMap.default[(mac ? "Cmd" : "Ctrl") + "-Space"] = "autocomplete";
  86. </script>
  87. <br/>
  88. <p><strong>Language:</strong> Testing and Test Control Notation -
  89. Configuration files
  90. (<a href="http://en.wikipedia.org/wiki/TTCN">TTCN-CFG</a>)
  91. </p>
  92. <p><strong>MIME types defined:</strong> <code>text/x-ttcn-cfg</code>.</p>
  93. <br/>
  94. <p>The development of this mode has been sponsored by <a href="http://www.ericsson.com/">Ericsson
  95. </a>.</p>
  96. <p>Coded by Asmelash Tsegay Gebretsadkan </p>
  97. </article>