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:

  1. 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>
  1. 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>
  1. Sample Content:
##
#	@author Kevin Lindsey
##
Serialization.js

Adding/Removing a File Association

  1. Add file association for *.lst
  2. Add Lexer file for LST
  3. Import Colorization file for LST
  4. Create new LST file (test.lst)
    1. Ensure new file opens in Generic Text Editor
  5. Open Generic Text preference page
  6. Change colorization in the preference window under "Token Colorization"
  7. Select Apply Changes
  8. Ensure colorization updates in open editor
  9. Remove association
    1. Ensure LST file no longer has generic text icon

Links

  1. IDE Core Basic Acceptance Tests
  2. Main Testing Section