[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kwrite-devel
Subject:    Re: Review Request 118086: Simple way to automatically test syntax highlighting files
From:       Gerald Senarclens de Grancy <gerald () senarclens ! eu>
Date:       2014-05-12 19:53:56
Message-ID: CAPszUghmB-_sHDkZagp9wfF_PmZqUHczN04wHdi_WGrJZyRsoA () mail ! gmail ! com
[Download RAW message or body]

[Attachment #2 (multipart/alternative)]


I've been a bit too much afk over the last few months to be up to date w/
what happend regarding to frameworks. Trying to cherry-pick the commit into
the frameworks branch I saw that the tests aren't part of that branch - so
do I have to do anything or just leave them solely in master?
Thx, g


On Mon, May 12, 2014 at 9:03 PM, Commit Hook <null@kde.org> wrote:

> This is an automatically generated e-mail. To reply, visit:
> https://git.reviewboard.kde.org/r/118086/
> 
> This review has been submitted with commit 003fbd557304f6121a383f3bcee3930fad8a8d66 \
> by Gerald Senarclens de Grancy to branch master. 
> 
> - Commit Hook
> 
> On May 11th, 2014, 10:10 p.m. UTC, Gerald Senarclens de Grancy wrote:
> Review request for Kate, Christoph Cullmann and Dominik Haumann.
> By Gerald Senarclens de Grancy.
> 
> *Updated May 11, 2014, 10:10 p.m.*
> *Bugs: * 334623 <http://bugs.kde.org/show_bug.cgi?id=334623>
> *Repository: * kate
> Description
> 
> Finally got around to throwing together a simple example of how to create automated \
> tests for the syntax highlighting files. The mechanism is easy enough and copies \
>                 the workings of the indentation tests:
> - a file called origin contains an example of highlighted syntax
> - the input.js simply iterates over origin's content and uses the functions \
> provided in the document API \
> (http://docs.kde.org/stable/en/applications/kate/dev-scripting.html#dev-scripting-api-document) \
> to test whether the current character is of the expected type (eg. \
>                 document.isComment, ...)
> - if all is fine, input.js appends "pass" to the content of origin, otherwise fail \
> with a hint on what went wrong is appended Hope this sounds useful to others as \
> well. In that case I'll add a few extra test snippets for some of the syntax bugs. 
> Testing
> 
> Yes, I actually tested the test to see if it does what I expected it to do :) Also \
> created bug 334623 to demonstrate how this mechanism can provide simple automated \
> tests against issues or regressions in the syntax files. Please note that the test \
> currently fails as it shows a minor issue in the Python syntax highlighting. 
> Diffs
> 
> - tests/CMakeLists.txt (38eaf5d)
> - tests/data/syntax_highlighting/python/.kateconfig (PRE-CREATION)
> - tests/data/syntax_highlighting/python/comment_1/expected
> (PRE-CREATION)
> - tests/data/syntax_highlighting/python/comment_1/input.js
> (PRE-CREATION)
> - tests/data/syntax_highlighting/python/comment_1/origin (PRE-CREATION)
> - tests/indenttest.cpp (b2038ca)
> - tests/script_test_base.h (a7bcd33)
> - tests/scripting_test.cpp (d746cb2)
> - tests/syntax_highlighting_test.h (PRE-CREATION)
> - tests/syntax_highlighting_test.cpp (PRE-CREATION)
> 
> View Diff <https://git.reviewboard.kde.org/r/118086/diff/>
> 
> _______________________________________________
> KWrite-Devel mailing list
> KWrite-Devel@kde.org
> https://mail.kde.org/mailman/listinfo/kwrite-devel
> 
> 


-- 
Gerald Senarclens de Grancy
http://senarclens.eu/~gerald/
Open minds on open source!


[Attachment #5 (text/html)]

<div dir="ltr"><div>I&#39;ve been a bit too much afk over the last few months to be \
up to date w/ what happend regarding to frameworks. Trying to cherry-pick the commit \
into the frameworks branch I saw that the tests aren&#39;t part of that branch - so \
do I have to do anything or just leave them solely in master?<br> </div>Thx, \
g<br></div><div class="gmail_extra"><br><br><div class="gmail_quote">On Mon, May 12, \
2014 at 9:03 PM, Commit Hook <span dir="ltr">&lt;<a href="mailto:null@kde.org" \
target="_blank">null@kde.org</a>&gt;</span> wrote:<br> <blockquote \
class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc \
solid;padding-left:1ex">



 <div>
  <div style="font-family:Verdana,Arial,Helvetica,Sans-Serif"><div class="">
   <table style="border:1px #c9c399 solid" bgcolor="#f9f3c9" cellpadding="8" \
width="100%">  <tbody><tr>
     <td>
      This is an automatically generated e-mail. To reply, visit:
      <a href="https://git.reviewboard.kde.org/r/118086/" \
target="_blank">https://git.reviewboard.kde.org/r/118086/</a>  </td>
    </tr>
   </tbody></table>
   <br>





 </div><pre style="white-space:pre-wrap;white-space:-moz-pre-wrap;white-space:-pre-wrap;white-space:-o-pre-wrap;word-wrap:break-word">This \
review has been submitted with commit 003fbd557304f6121a383f3bcee3930fad8a8d66 by \
Gerald Senarclens de Grancy to branch master.</pre>

 <br>









<p>- Commit Hook</p><div class="">


<br>
<p>On May 11th, 2014, 10:10 p.m. UTC, Gerald Senarclens de Grancy wrote:</p>








</div><table style="background-image:url(&#39;&#39;);background-repeat:repeat-x;border:1px \
black solid" bgcolor="#fefadf" cellpadding="8" cellspacing="0" width="100%">  \
<tbody><tr>  <td><div class="">

<div>Review request for Kate, Christoph Cullmann and Dominik Haumann.</div>
<div>By Gerald Senarclens de Grancy.</div>


</div><p style="color:grey"><i>Updated May 11, 2014, 10:10 p.m.</i></p>







<div style="margin-top:1.5em">
 <b style="color:#575012;font-size:10pt;margin-top:1.5em">Bugs: </b>


 <a href="http://bugs.kde.org/show_bug.cgi?id=334623" target="_blank">334623</a>


</div><div class="">



<div style="margin-top:1.5em">
 <b style="color:#575012;font-size:10pt">Repository: </b>
kate
</div>


<h1 style="color:#575012;font-size:10pt;margin-top:1.5em">Description </h1>
 <table style="border:1px solid #b8b5a0" bgcolor="#ffffff" cellpadding="10" \
cellspacing="0" width="100%">  <tbody><tr>
  <td>
   <pre style="margin:0;padding:0;white-space:pre-wrap;white-space:-moz-pre-wrap;white-space:-pre-wrap;white-space:-o-pre-wrap;word-wrap:break-word">Finally \
got around to throwing together a simple example of how to create automated tests for \
the syntax highlighting files. The mechanism is easy enough and copies the workings \
                of the indentation tests:
- a file called origin contains an example of highlighted syntax
- the input.js simply iterates over origin&#39;s content and uses the functions \
provided in the document API (<a \
href="http://docs.kde.org/stable/en/applications/kate/dev-scripting.html#dev-scripting-api-document" \
target="_blank">http://docs.kde.org/stable/en/applications/kate/dev-scripting.html#dev-scripting-api-document</a>) \
to test whether the current character is of the expected type (eg. \
                document.isComment, ...)
- if all is fine, input.js appends &quot;pass&quot; to the content of origin, \
otherwise fail with a hint on what went wrong is appended Hope this sounds useful to \
others as well. In that case I&#39;ll add a few extra test snippets for some of the \
syntax bugs.</pre>  </td>
 </tr>
</tbody></table>


<h1 style="color:#575012;font-size:10pt;margin-top:1.5em">Testing </h1>
<table style="border:1px solid #b8b5a0" bgcolor="#ffffff" cellpadding="10" \
cellspacing="0" width="100%">  <tbody><tr>
  <td>
   <pre style="margin:0;padding:0;white-space:pre-wrap;white-space:-moz-pre-wrap;white-space:-pre-wrap;white-space:-o-pre-wrap;word-wrap:break-word">Yes, \
I actually tested the test to see if it does what I expected it to do :) Also created \
bug 334623 to demonstrate how this mechanism can provide simple automated tests \
against issues or regressions in the syntax files. Please note that the test \
currently fails as it shows a minor issue in the Python syntax highlighting.</pre>

  </td>
 </tr>
</tbody></table>


<h1 style="color:#575012;font-size:10pt;margin-top:1.5em">Diffs </h1>
<ul style="margin-left:3em;padding-left:0">

 <li>tests/CMakeLists.txt <span style="color:grey">(38eaf5d)</span></li>

 <li>tests/data/syntax_highlighting/python/.kateconfig <span \
style="color:grey">(PRE-CREATION)</span></li>

 <li>tests/data/syntax_highlighting/python/comment_1/expected <span \
style="color:grey">(PRE-CREATION)</span></li>

 <li>tests/data/syntax_highlighting/python/comment_1/input.js <span \
style="color:grey">(PRE-CREATION)</span></li>

 <li>tests/data/syntax_highlighting/python/comment_1/origin <span \
style="color:grey">(PRE-CREATION)</span></li>

 <li>tests/indenttest.cpp <span style="color:grey">(b2038ca)</span></li>

 <li>tests/script_test_base.h <span style="color:grey">(a7bcd33)</span></li>

 <li>tests/scripting_test.cpp <span style="color:grey">(d746cb2)</span></li>

 <li>tests/syntax_highlighting_test.h <span \
style="color:grey">(PRE-CREATION)</span></li>

 <li>tests/syntax_highlighting_test.cpp <span \
style="color:grey">(PRE-CREATION)</span></li>

</ul>

<p><a href="https://git.reviewboard.kde.org/r/118086/diff/" style="margin-left:3em" \
target="_blank">View Diff</a></p>







  </div></td>
 </tr>
</tbody></table>








  </div>
 </div>


<br>_______________________________________________<br>
KWrite-Devel mailing list<br>
<a href="mailto:KWrite-Devel@kde.org">KWrite-Devel@kde.org</a><br>
<a href="https://mail.kde.org/mailman/listinfo/kwrite-devel" \
target="_blank">https://mail.kde.org/mailman/listinfo/kwrite-devel</a><br> \
<br></blockquote></div><br><br clear="all"><br>-- <br>Gerald Senarclens de \
Grancy<br><a href="http://senarclens.eu/~gerald/" \
target="_blank">http://senarclens.eu/~gerald/</a><br>Open minds on open source! \
</div>



_______________________________________________
KWrite-Devel mailing list
KWrite-Devel@kde.org
https://mail.kde.org/mailman/listinfo/kwrite-devel


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic