File tree Expand file tree Collapse file tree 6 files changed +14726
-4
lines changed Expand file tree Collapse file tree 6 files changed +14726
-4
lines changed Original file line number Diff line number Diff line change 77 - make
88
99script :
10- - make test
10+ - make ci-test
11+ - ' curl -s https://raw.githubusercontent.com/atom/ci/master/build-package.sh | sh'
Original file line number Diff line number Diff line change 1- .PHONY : all test release devenv publish
1+ .PHONY : all ci-test test release devenv publish
22
33all : devenv release
44
5- test : release
5+ ci- test : release
66# Run tests
77 ./node_modules/.bin/syntaxdev test --tests test/**/*.py --syntax grammars/src/MagicPython.syntax.yaml
88 ./node_modules/.bin/syntaxdev test --tests test/**/*.re --syntax grammars/src/MagicRegExp.syntax.yaml
@@ -15,8 +15,11 @@ test: release
1515 ] ; \
1616 then echo "Error: package.version != git.tag" && exit 1 ; fi
1717
18+ test : ci-test
19+ atom -t .
20+
1821devenv :
19- npm install syntaxdev@0.0.13
22+ npm install syntaxdev@0.0.15
2023
2124release :
2225 ./node_modules/.bin/syntaxdev build-plist --in grammars/src/MagicPython.syntax.yaml --out grammars/MagicPython.tmLanguage
@@ -27,6 +30,9 @@ release:
2730
2831 ./node_modules/.bin/syntaxdev scopes --syntax grammars/src/MagicPython.syntax.yaml > misc/scopes
2932
33+ ./node_modules/.bin/syntaxdev atom-spec --package-name MagicPython --tests test/**/*.py --syntax grammars/src/MagicPython.syntax.yaml --out test/atom-spec/python-spec.js
34+ ./node_modules/.bin/syntaxdev atom-spec --package-name MagicPython --tests test/**/*.re --syntax grammars/src/MagicRegExp.syntax.yaml --out test/atom-spec/python-re-spec.js
35+
3036publish : test
3137 apm publish patch
3238 rm -rf ./node_modules/syntaxdev
Original file line number Diff line number Diff line change 1+ This directory contains tests for Atom editor. Spec files prefixed
2+ with ` python- ` are autogenerated by ` make ` .
Original file line number Diff line number Diff line change 1+ describe ( "MagicPython basic integration tests" , function ( ) {
2+ var grammar = null ;
3+
4+ beforeEach ( function ( ) {
5+ waitsForPromise ( function ( ) {
6+ return atom . packages . activatePackage ( "MagicPython" )
7+ } ) ;
8+ runs ( function ( ) {
9+ grammar = atom . grammars . grammarForScopeName ( "source.python" )
10+ } ) ;
11+ } ) ;
12+
13+ it ( "recognises shebang on firstline" , function ( ) {
14+ expect ( grammar . firstLineRegex . scanner . findNextMatchSync (
15+ "#!/usr/bin/env python" ) ) . not . toBeNull ( ) ;
16+
17+ expect ( grammar . firstLineRegex . scanner . findNextMatchSync (
18+ "#! /usr/bin/env python" ) ) . not . toBeNull ( ) ;
19+ } ) ;
20+
21+ it ( "parses the grammar" , function ( ) {
22+ expect ( grammar ) . toBeDefined ( ) ;
23+ expect ( grammar . scopeName ) . toBe ( "source.python" ) ;
24+ } ) ;
25+ } ) ;
You can’t perform that action at this time.
0 commit comments