Generic Text Editor Basic Acceptance Tests
From Aptana Development
General
Remember to do the basic general tests for every editor in addition to doing the following editor-specific tests
Before beginning this test, you will need the following two files:
- Lexer File:
<?xml version="1.0" encoding="utf-8"?> <lexer xmlns="http://www.aptana.com/2007/lexer/1.2" language="text/lst"> <token-group group="default"> <category-group category="WHITESPACE"> <one-or-more type="WHITESPACE"> <whitespace/> </one-or-more> <comment type="COMMENT" start="#"></comment> <comment type="COMMENT" start="/*" end="*/"></comment> </category-group> <category-group category="LITERAL"> <and type="FILENAME"> <start-of-line/> <one-or-more> <character-class negate="true">\r\n</character-class> </one-or-more> </and> </category-group> </token-group> <token-group group="error"> <one-or-more category="ERROR" type="ERROR" switch-to="default"> <character-class negate="true">\r\n</character-class> </one-or-more> </token-group> </lexer>
- Colorization File:
<?xml version="1.0" encoding="UTF-8"?> <colorizer xmlns="http://www.aptana.com/2007/colorizer/1.0" language="text/lst"> <category name="ERROR" style="ERROR"/> <category name="LITERAL" style="LITERAL"/> <category name="WHITESPACE" style="WHITESPACE"> <token type="COMMENT" style="WHITESPACE_COMMENT"/> </category> <style foreground="rgb(255,0,0)" id="ERROR"/> <style foreground="rgb(0,64,128)" id="LITERAL"/> <style foreground="rgb(0,0,0)" id="WHITESPACE"/> <style foreground="rgb(64,128,128)" id="WHITESPACE_COMMENT"/> </colorizer>
- Sample Content:
## # @author Kevin Lindsey ## Serialization.js
Adding/Removing a File Association
- Add file association for *.lst
- Add Lexer file for LST
- Import Colorization file for LST
- Create new LST file (test.lst)
- Ensure new file opens in Generic Text Editor
- Open Generic Text preference page
- Change colorization in the preference window under "Token Colorization"
- Select Apply Changes
- Ensure colorization updates in open editor
- Remove association
- Ensure LST file no longer has generic text icon


