File tree 6 files changed +14726
-4
lines changed
6 files changed +14726
-4
lines changed Original file line number Diff line number Diff line change 7
7
- make
8
8
9
9
script :
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
2
2
3
3
all : devenv release
4
4
5
- test : release
5
+ ci- test : release
6
6
# Run tests
7
7
./node_modules/.bin/syntaxdev test --tests test/**/*.py --syntax grammars/src/MagicPython.syntax.yaml
8
8
./node_modules/.bin/syntaxdev test --tests test/**/*.re --syntax grammars/src/MagicRegExp.syntax.yaml
@@ -15,8 +15,11 @@ test: release
15
15
] ; \
16
16
then echo "Error: package.version != git.tag" && exit 1 ; fi
17
17
18
+ test : ci-test
19
+ atom -t .
20
+
18
21
devenv :
19
-
22
+
20
23
21
24
release :
22
25
./node_modules/.bin/syntaxdev build-plist --in grammars/src/MagicPython.syntax.yaml --out grammars/MagicPython.tmLanguage
@@ -27,6 +30,9 @@ release:
27
30
28
31
./node_modules/.bin/syntaxdev scopes --syntax grammars/src/MagicPython.syntax.yaml > misc/scopes
29
32
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
+
30
36
publish : test
31
37
apm publish patch
32
38
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