mirror of
https://github.com/kristoferssolo/solorice.git
synced 2025-10-21 20:10:34 +00:00
28 lines
827 B
JavaScript
28 lines
827 B
JavaScript
describe("python-console tests", function() {
|
|
var grammar = null;
|
|
|
|
beforeEach(function() {
|
|
waitsForPromise(function() {
|
|
return atom.packages.activatePackage("MagicPython")
|
|
});
|
|
runs(function() {
|
|
grammar = atom.grammars.grammarForScopeName("text.python.console")
|
|
});
|
|
});
|
|
|
|
it("highlights >>>", function() {
|
|
tokens = grammar.tokenizeLines(">>> print")
|
|
|
|
expect(tokens[0][0].value).toBe(">>>");
|
|
expect(tokens[0][0].scopes).toEqual(
|
|
['text.python.console', 'punctuation.separator.prompt.python.console']);
|
|
|
|
expect(tokens[0][1].value).toBe(" ");
|
|
expect(tokens[0][1].scopes).toEqual(['text.python.console']);
|
|
|
|
expect(tokens[0][2].value).toBe("print");
|
|
expect(tokens[0][2].scopes).toEqual(
|
|
['text.python.console', 'support.function.builtin.python']);
|
|
});
|
|
});
|