Unnamed: 0
int64 0
305k
| body
stringlengths 7
52.9k
| name
stringlengths 1
185
|
|---|---|---|
300,600
|
void () { doTest("<a<caret> alt='</>'></a>", "\bb", "<b alt='</>'></b>"); }
|
testLastCharDeletedAndNewAdded
|
300,601
|
void () { doTest("<<selection>div</selection>></div>", "b", "<b></b>"); }
|
testSelection
|
300,602
|
void () { doTest(""" <div<caret>></div> <div<caret>></div> """, "v", """ <divv></divv> <divv></divv> """); }
|
testMultiCaret
|
300,603
|
void () { doTest(""" <div<caret>> <div<caret>></div> </div>""", "v", """ <divv> <divv></divv> </divv>"""); }
|
testMultiCaretNested
|
300,604
|
void () { doTest(""" <div<caret>></div> <div></div> """, "\b\b\biii", """ <iii></iii> <div></div> """); myFixture.getEditor().getCaretModel().addCaret(new VisualPosition(1, 4)); type("\b"); myFixture.checkResult(""" <ii></ii> <di></di> """); }
|
testMultiCaretAdding
|
300,605
|
void () { doTest(""" <div class="container"> <div class="row"> <div class="col-xs-2"></div> <<selection>div</selection> class="col-xs-10"></div> </div> </div>""", "a", """ <div class="container"> <div class="row"> <div class="col-xs-2"></div> <a class="col-xs-10"></a> </div> </div>"""); myFixture.performEditorAction(IdeActions.ACTION_UNDO); type("a"); myFixture.checkResult(""" <div class="container"> <div class="row"> <div class="col-xs-2"></div> <a class="col-xs-10"></a> </div> </div>"""); }
|
testAfterUndo
|
300,606
|
void () { doTest("<div<caret>></div>", " ", "<div ></div>"); }
|
testSpace
|
300,607
|
void () { doTest("<divv<caret>></div>", "\bd", "<divd></divd>"); }
|
testRecommence
|
300,608
|
void () { doTestCompletion("<html><body></body><b<caret>></b><html>", null, "<html><body></body><body></body><html>"); }
|
testCompletionSimple
|
300,609
|
void () { doTestCompletion("<html><body></body><bertran></bertran><b<caret>></b><html>", "e\n", "<html><body></body><bertran></bertran><bertran></bertran><html>"); }
|
testCompletionWithLookup
|
300,610
|
void () { doTestCompletion("<html><body></body><bertran></bertran><b<caret>></b><html>", "e", "<html><body></body><bertran></bertran><be></be><html>"); assertNotNull(myFixture.getLookup()); }
|
testCompletionWithLookupAfterTyping
|
300,611
|
void () { doTest("<div> \n \n</div><caret>", "\n", "<div> \n \n</div>\n"); final PsiFile file = myFixture.getFile(); myFixture.getEditor().getCaretModel().moveToOffset(myFixture.getDocument(file).getTextLength() - 2); final EditorSettingsExternalizable editorSettings = EditorSettingsExternalizable.getInstance(); String stripTrailingSpaces = editorSettings.getStripTrailingSpaces(); editorSettings.setStripTrailingSpaces(EditorSettingsExternalizable.STRIP_TRAILING_SPACES_WHOLE); try { FileDocumentManager.getInstance().saveDocument(myFixture.getDocument(file)); } finally { editorSettings.setStripTrailingSpaces(stripTrailingSpaces); } myFixture.checkResult("<div>\n\n</div>\n"); }
|
testSave
|
300,612
|
void () { doTest("<div<caret>></div>", "v", "<divv></divv>"); myFixture.performEditorAction(IdeActions.ACTION_UNDO); myFixture.checkResult("<div></div>"); }
|
testUndo
|
300,613
|
void () { myFixture.configureByText(XmlFileType.INSTANCE, "<di<caret>v></div>"); myFixture.performEditorAction(IdeActions.ACTION_HIPPIE_COMPLETION); myFixture.checkResult("<divv></divv>"); }
|
testWordExpand
|
300,614
|
void () { doTest("<div>text</span><caret></div>", "\b\b\b\b\b\b\b", "<div>text</div>"); }
|
testDeletingIncorrectTag
|
300,615
|
void () { doTest("<div></div><caret></div>", "\b\b\b\b\b\b", "<div></div>"); }
|
testEndTagEnd
|
300,616
|
void () { doTest("<soap:some<caret>:some></soap:some:some>", "a", "<soap:somea:some></soap:somea:some>"); }
|
testDoubleColonError
|
300,617
|
void () { myFixture.configureByText(XmlFileType.INSTANCE, "<div<caret>></div>"); final Editor editor = EditorFactory.getInstance().createEditor(myFixture.getEditor().getDocument()); EditorFactory.getInstance().releaseEditor(editor); type("v"); myFixture.checkResult("<divv></divv>"); }
|
testMultipleEditors
|
300,618
|
void () { myFixture.configureByText(XmlFileType.INSTANCE, "<di<caret>></di>"); type("v"); Ref<Boolean> eventSent = Ref.create(false); myFixture.getEditor().getDocument().addDocumentListener(new DocumentListener() { @Override public void documentChanged(@NotNull DocumentEvent e) { eventSent.set(true); } }, myFixture.getTestRootDisposable()); myFixture.testAction(new MoveCaretLeftAction()); assertFalse(eventSent.get()); }
|
testDoNotFireDocumentChangeEventIfTagWasNotChanged
|
300,619
|
void (@NotNull DocumentEvent e) { eventSent.set(true); }
|
documentChanged
|
300,620
|
void () { doTestCompletion("<htm<caret> xmlns='http://www.w3.org/1999/xhtml'></htm>", null, "<html<caret> xmlns='http://www.w3.org/1999/xhtml'></html>"); }
|
testCompleteSingleVariant
|
300,621
|
void () { myFixture.configureByText("foo.html","<div>ab<<caret>>cd</>ef</div>"); myFixture.type("div"); myFixture.checkResult("<div>ab<div>cd</div>ef</div>"); }
|
testEmptyTagStartSync
|
300,622
|
void () { myFixture.configureByText("foo.html","<div>ab<>cd</<caret>>ef</div>"); myFixture.type("div"); myFixture.checkResult("<div>ab<div>cd</div>ef</div>"); }
|
testEmptyTagEndSync
|
300,623
|
void () { myFixture.configureByText("foo.html","<b>ab</<caret>>cd</b>"); myFixture.type("br"); myFixture.checkResult("<b>ab</br>cd</b>"); }
|
testEmptyEndSync
|
300,624
|
void () { doTest("<foo><<caret>", '/', "<foo></foo>"); }
|
testClosingTag
|
300,625
|
void () { doTest("<foo bar<caret>><foo bar<caret>>", '=', "<foo bar=\"<caret>\"><foo bar=\"<caret>\">"); }
|
testValueQuotesWithMultiCarets
|
300,626
|
void () { doTest("<foo bar<caret>\n<foo bar<caret>", '=', "<foo bar=\"<caret>\"\n<foo bar=\"<caret>\""); }
|
testValueQuotesWithMultiCaretsMultiline
|
300,627
|
void () { doTest("<foo bar <caret>><foo bar<caret>>", '=', "<foo bar =<caret>><foo bar=\"<caret>\">"); }
|
testValueQuotesWithMultiCaretsWithDifferentContexts
|
300,628
|
void () { doTest(""" <bar> <foo><<caret> <foo><<caret> </bar>""", '/', """ <bar> <foo></foo><caret> <foo></foo><caret> </bar>"""); }
|
testCloseTagOnSlashWithMultiCarets
|
300,629
|
void () { doTest(""" <bar> <foo<caret> <foo<caret> </bar>""", '>', """ <bar> <foo><caret></foo> <foo><caret></foo> </bar>"""); }
|
testCloseTagOnGtWithMultiCarets
|
300,630
|
void () { doTest(""" <bar> <foo><<caret> <fiz><<caret> </bar>""", '/', """ <bar> <foo></foo><caret> <fiz></fiz><caret> </bar>"""); }
|
testCloseTagOnSlashWithMultiCaretsInDifferentContexts
|
300,631
|
void () { doTest(""" <bar> <foo<caret> <fiz<caret> </bar>""", '>', """ <bar> <foo><caret></foo> <fiz><caret></fiz> </bar>"""); }
|
testCloseTagOnGtWithMultiCaretsInDifferentContexts
|
300,632
|
void () { doTest("<foo><<caret>foo>", '/', "<foo></foo>"); }
|
testGreedyClosing
|
300,633
|
void () { doTest("<foo bar<caret>", '=', "<foo bar=\"<caret>\""); WebEditorOptions.getInstance().setInsertQuotesForAttributeValue(false); try { doTest("<foo bar<caret>", '=', "<foo bar=<caret>"); } finally { WebEditorOptions.getInstance().setInsertQuotesForAttributeValue(true); } }
|
testValueQuotas
|
300,634
|
void () { final HtmlCodeStyleSettings settings = getHtmlSettings(); final CodeStyleSettings.QuoteStyle quote = settings.HTML_QUOTE_STYLE; try { settings.HTML_QUOTE_STYLE = CodeStyleSettings.QuoteStyle.Single; myFixture.configureByText(HtmlFileType.INSTANCE, "<foo bar<caret>"); myFixture.type('='); myFixture.checkResult("<foo bar='<caret>'"); } finally { settings.HTML_QUOTE_STYLE = quote; } }
|
testSingleQuotes
|
300,635
|
void () { final HtmlCodeStyleSettings settings = getHtmlSettings(); final CodeStyleSettings.QuoteStyle quote = settings.HTML_QUOTE_STYLE; try { settings.HTML_QUOTE_STYLE = CodeStyleSettings.QuoteStyle.None; myFixture.configureByText(HtmlFileType.INSTANCE, "<foo bar<caret>>text"); myFixture.type('='); myFixture.checkResult("<foo bar=<caret>>text"); } finally { settings.HTML_QUOTE_STYLE = quote; } }
|
testNoneQuotes
|
300,636
|
void () { doTest(""" <foo> <bar<caret></bar> </foo>""", '>', """ <foo> <bar></bar> </foo>"""); }
|
testFooBar
|
300,637
|
void () { doTest( "<a foo=\"1\"\n" + " bar=\"2\"><caret></a>", '\n', """ <a foo="1" bar="2"> <caret> </a>""" ); }
|
testWeb13982
|
300,638
|
void () { doTest( "<h1>Title</h1>\n" + "<p>body text</p><caret>", '\n', """ <h1>Title</h1> <p>body text</p> <caret>""" ); }
|
testWeb392
|
300,639
|
void () { doTest("<<caret>", '?', "<?<caret> ?>"); doTest("<caret>", '?', "?"); doTest("<<caret> ?>", '?', "<?<caret> ?>"); }
|
testPi
|
300,640
|
void () { doTest( """ <div> <p> Some text </p> <<caret>""", '/', """ <div> <p> Some text </p> </div><caret>""" ); }
|
testAutoindentEndTag
|
300,641
|
void () { boolean surround = CodeInsightSettings.getInstance().SURROUND_SELECTION_ON_QUOTE_TYPED; try { CodeInsightSettings.getInstance().SURROUND_SELECTION_ON_QUOTE_TYPED = true; doTest("<selection><div></div></selection>", '(', "(<div></div>)"); } finally { CodeInsightSettings.getInstance().SURROUND_SELECTION_ON_QUOTE_TYPED = surround; } }
|
testSelectionBraces
|
300,642
|
void () { boolean surround = CodeInsightSettings.getInstance().SURROUND_SELECTION_ON_QUOTE_TYPED; try { CodeInsightSettings.getInstance().SURROUND_SELECTION_ON_QUOTE_TYPED = true; doTest("<div><selection><div></div></selection></div>", '(', "<div>(<div></div>)</div>"); } finally { CodeInsightSettings.getInstance().SURROUND_SELECTION_ON_QUOTE_TYPED = surround; } }
|
testSelectionBracesInner
|
300,643
|
void () { boolean surround = CodeInsightSettings.getInstance().SURROUND_SELECTION_ON_QUOTE_TYPED; try { CodeInsightSettings.getInstance().SURROUND_SELECTION_ON_QUOTE_TYPED = true; doTest("<selection><div></selection></div>", '(', "(<div>)</div>"); } finally { CodeInsightSettings.getInstance().SURROUND_SELECTION_ON_QUOTE_TYPED = surround; } }
|
testSelectionBracesStart
|
300,644
|
void () { boolean surround = CodeInsightSettings.getInstance().SURROUND_SELECTION_ON_QUOTE_TYPED; try { CodeInsightSettings.getInstance().SURROUND_SELECTION_ON_QUOTE_TYPED = true; doTest("<div><selection></div></selection>", '(', "<div>(</div>)"); } finally { CodeInsightSettings.getInstance().SURROUND_SELECTION_ON_QUOTE_TYPED = surround; } }
|
testSelectionBracesEnd
|
300,645
|
void () { boolean surround = CodeInsightSettings.getInstance().SURROUND_SELECTION_ON_QUOTE_TYPED; try { CodeInsightSettings.getInstance().SURROUND_SELECTION_ON_QUOTE_TYPED = true; doTest("<selection><div/></selection>", '(', "(<div/>)"); } finally { CodeInsightSettings.getInstance().SURROUND_SELECTION_ON_QUOTE_TYPED = surround; } }
|
testSelectionBracesShort
|
300,646
|
void () { boolean surround = CodeInsightSettings.getInstance().SURROUND_SELECTION_ON_QUOTE_TYPED; try { CodeInsightSettings.getInstance().SURROUND_SELECTION_ON_QUOTE_TYPED = true; doTest("<div><selection><div/></selection></div>", '(', "<div>(<div/>)</div>"); } finally { CodeInsightSettings.getInstance().SURROUND_SELECTION_ON_QUOTE_TYPED = surround; } }
|
testSelectionBracesShortInner
|
300,647
|
void () { myFixture.configureByText("test.html", "<div><caret></div>"); myFixture.type("</"); myFixture.checkResult("<div></></div>"); }
|
testTagClosing
|
300,648
|
void () { myFixture.configureByText("test.html", "<div><caret></div>"); myFixture.type("<>aa</"); myFixture.checkResult("<div><>aa</></div>"); }
|
testTagClosing2
|
300,649
|
void () { myFixture.configureByText("test.xml", "<foo attr<caret>><bar attr<caret>></bar></foo>"); myFixture.type("=\"foo\" a2='"); myFixture.checkResult("<foo attr=\"foo\" a2=\"'\"><bar attr=\"foo\" a2=\"'\"></bar></foo>"); }
|
testAttributeValueQuoteEatXml
|
300,650
|
void () { myFixture.configureByText("test.html", "<div attr<caret>><div attr<caret>></div></div>"); myFixture.type("=\"foo\" a2='bar"); myFixture.checkResult("<div attr=\"foo\" a2=\"bar\"><div attr=\"foo\" a2=\"bar\"></div></div>"); }
|
testAttributeValueQuoteEatHtml
|
300,651
|
void (String text, char c, String result) { myFixture.configureByText(XmlFileType.INSTANCE, text); myFixture.type(c); myFixture.checkResult(result); }
|
doTest
|
300,652
|
HtmlCodeStyleSettings () { return CodeStyle.getSettings(myFixture.getProject()) .getCustomSettings(HtmlCodeStyleSettings.class); }
|
getHtmlSettings
|
300,653
|
String () { return XmlTestUtil.getXmlTestDataPath(); }
|
getTestDataPath
|
300,654
|
void () { String path = "/codeInsight/defaultAction/greater/"; configureByFile(path + "1.html"); performAction('>'); checkResultByFile(path + "1_after.html"); configureByFile(path + "2.html"); performAction('>'); checkResultByFile(path + "2_after.html"); configureByFile(path + "3.html"); performAction('>'); checkResultByFile(path + "3_after.html"); configureByFile(path + "4.html"); performAction('>'); checkResultByFile(path + "4_after.html"); configureByFile(path + "5.html"); performAction('>'); checkResultByFile(path + "5_after.html"); configureByFile(path + "6.html"); performAction('>'); checkResultByFile(path + "6_after.html"); configureByFile(path + "7.html"); performAction('>'); checkResultByFile(path + "7_after.html"); }
|
testHtmlGreater
|
300,655
|
void () { String path = "/codeInsight/defaultAction/greater/"; configureByFile(path + "1.xhtml"); performAction('>'); checkResultByFile(path + "1_after.xhtml"); }
|
testXHtmlGreater
|
300,656
|
void () { String path = "/codeInsight/defaultAction/greater/"; configureByFile(path + "1.xml"); performAction('>'); checkResultByFile(path + "1_after.xml"); configureByFile(path + "2.xml"); performAction('>'); checkResultByFile(path + "2_after.xml"); configureByFile(path + "3.xml"); performAction('>'); checkResultByFile(path + "3_after.xml"); configureByFile(path + "4.xml"); performAction('>'); checkResultByFile(path + "4_after.xml"); configureByFile(path + "5.xml"); performAction('>'); checkResultByFile(path + "5_after.xml"); configureByFile(path + "6.xml"); performAction('>'); checkResultByFile(path + "6_after.xml"); configureByFile(path + "7.xml"); performAction('>'); checkResultByFile(path + "7_after.xml"); configureByFile(path + "8.xml"); performAction('>'); checkResultByFile(path + "8_after.xml"); configureByFile(path + "9.xml"); performAction('>'); checkResultByFile(path + "9_after.xml"); configureByFile(path + "10.xml"); performAction('>'); checkResultByFile(path + "10_after.xml"); configureByFile(path + "11.xml"); performAction('>'); checkResultByFile(path + "11_after.xml"); configureByFile(path + "12.xml"); performAction('>'); checkResultByFile(path + "12_after.xml"); configureByFile(path + "12_2.xml"); performAction('>'); checkResultByFile(path + "12_2_after.xml"); configureByFile(path + "12_3.xml"); performAction('>'); checkResultByFile(path + "12_3_after.xml"); configureByFile(path + "13.xml"); performAction('>'); checkResultByFile(path + "13_after.xml"); }
|
testXmlGreater
|
300,657
|
String () { return XmlTestUtil.getXmlTestDataPath(); }
|
getTestDataPath
|
300,658
|
void () { doTest('"'); }
|
testAttributeStart
|
300,659
|
void () { doTest('"'); }
|
testAttributeEnd
|
300,660
|
void (char c) { String path = "/codeInsight/defaultAction/quote/"; configureByFile(path + getTestName(false) + ".xml"); performAction(c); checkResultByFile(path + getTestName(false) + "_after.xml"); }
|
doTest
|
300,661
|
String () { return XmlTestUtil.getXmlTestDataPath(); }
|
getTestDataPath
|
300,662
|
void () { String path = "/codeInsight/defaultAction/slash/"; configureByFile(path + "1.xml"); performAction('/'); checkResultByFile(path + "1_after.xml"); configureByFile(path + "2.xml"); performAction('/'); checkResultByFile(path + "2_after.xml"); configureByFile(path + "3.xml"); performAction('/'); checkResultByFile(path + "3_after.xml"); configureByFile(path + "4.xml"); performAction('/'); checkResultByFile(path + "4_after.xml"); }
|
testXmlSlash
|
300,663
|
void () { String path = "/codeInsight/defaultAction/slash/"; configureByFile(path + "1.html"); performAction('/'); checkResultByFile(path + "1_after.html"); }
|
testHtmlSlash
|
300,664
|
TemplateState () { return TemplateManagerImpl.getTemplateState(myFixture.getEditor()); }
|
getState
|
300,665
|
void () { final TemplateManager manager = TemplateManager.getInstance(getProject()); final Template template = manager.createTemplate("frm", "user", "$VAR$"); template.addVariable("VAR", new EmptyNode(), new ConstantNode("<"), true); myFixture.configureByText("a.xml", "<tag><caret></tag>"); manager.startTemplate(myFixture.getEditor(), template); myFixture.checkResult("<tag><selection><</selection><caret></tag>"); }
|
test_tag_template_in_xml
|
300,666
|
void () { myFixture.configureByText("a.xml", "<tag><caret></tag>"); myFixture.type("CD\t"); myFixture.checkResult(""" <tag><![CDATA[ ]]></tag>"""); }
|
test_insert_CDATA_by_CD_and_tab
|
300,667
|
void () { final TemplateImpl template = TemplateSettings.getInstance().getTemplate("CD", "HTML/XML"); TestCase.assertTrue(isApplicable("<foo><caret> </foo>", template)); TestCase.assertFalse(isApplicable("<foo bar=\"<caret>\"></foo>", template)); }
|
testAvailabilityCDATA
|
300,668
|
void () { final TemplateImpl template = TemplateSettings.getInstance().getTemplate("T", "HTML/XML"); TestCase.assertTrue(isApplicable("<foo><caret> </foo>", template)); TestCase.assertFalse(isApplicable("<foo bar=\"<caret>\"></foo>", template)); }
|
testAvailabilityT
|
300,669
|
void () { HtmlCodeStyleSettings settings = getHtmlSettings(); CodeStyleSettings.QuoteStyle originalQuoteStyle = settings.HTML_QUOTE_STYLE; boolean emmetEnabled = EmmetOptions.getInstance().isEmmetEnabled(); boolean originalEnforceQuotes = settings.HTML_ENFORCE_QUOTES; settings.HTML_QUOTE_STYLE = CodeStyleSettings.QuoteStyle.Single; settings.HTML_ENFORCE_QUOTES = true; EmmetOptions.getInstance().setEmmetEnabled(false); try { myFixture.configureByText("a.html", "<div><caret></div>"); myFixture.type("input:color\t"); myFixture.type("inputName"); myFixture.checkResult("<div><input type='color' name='inputName' id=''></div>"); } finally { EmmetOptions.getInstance().setEmmetEnabled(emmetEnabled); settings.HTML_QUOTE_STYLE = originalQuoteStyle; settings.HTML_ENFORCE_QUOTES = originalEnforceQuotes; } }
|
testQuotedTemplateParametersWithEnforceQuotesOnReformat
|
300,670
|
HtmlCodeStyleSettings () { return CodeStyle.getSettings(getProject()).getCustomSettings(HtmlCodeStyleSettings.class); }
|
getHtmlSettings
|
300,671
|
boolean (String text, TemplateImpl inst) { myFixture.configureByText(XmlFileType.INSTANCE, text); PsiFile file = myFixture.getFile(); int offset = myFixture.getEditor().getCaretModel().getOffset(); return TemplateManagerImpl.isApplicable(inst, TemplateActionContext.expanding(file, offset)); }
|
isApplicable
|
300,672
|
void () { addTest(""" div<caret> div<caret> div<caret>""", """ <div><caret></div> <div><caret></div> <div><caret></div>"""); //should place caret at first variable addTest(""" a<caret> a<caret> a<caret>""", """ <a href="<caret>"></a> <a href="<caret>"></a> <a href="<caret>"></a>"""); }
|
addMultiCaretTests
|
300,673
|
void () { addTest("ul>li[@click=\"method\" :title=\"task.title\"]", """ <ul> <li @click="method" :title="task.title"></li> </ul>"""); addTest("t[type=application/atom+xml]", "<t type=\"application/atom+xml\"></t>"); addTest("basefont[href]/", "<basefont href=\"\">"); addTest("use[xlink:href]", "<use xlink:href=\"\"></use>", "xml"); addTest("input[-title]", "<input type=\"text\" -title=\"\">"); addTest("input[+title]", "<input type=\"text\" +title=\"\">"); addTest("<br/>br", "<br/><br>"); addTest("div[0]", "div[0]"); addTest("div{ }", "<div> </div>"); addTest("div[data-object=]", "<div data-object=\"\"></div>"); addTest("div[data-object={id:2}]", "<div data-object=\"{id:2}\"></div>"); addTest("ul>li(a)*2", """ <ul> <li><a href=""></a></li> <li><a href=""></a></li> </ul>"""); addTest("ul>li(a)", """ <ul> <li><a href=""></a></li> </ul>"""); addTest("(>span)", "<span></span>"); addTest("div(span)", "<div><span></span></div>"); addTest("div(span)+div", "<div><span></span></div>\n" + "<div></div>"); addTest("div(>span)+div", "<div><span></span></div>\n" + "<div></div>"); addTest("div.recording>h2.recording__title(>span)+div.recording__image(>p.recording__meta)", """ <div class="recording"> <h2 class="recording__title"><span></span></h2> <div class="recording__image"> <p class="recording__meta"></p> </div> </div>"""); addTest("div.recording>h2.recording__title>(span)+div.recording__image(>p.recording__meta)", """ <div class="recording"> <h2 class="recording__title"><span></span> <div class="recording__image"> <p class="recording__meta"></p> </div> </h2> </div>"""); }
|
addRegressionTests
|
300,674
|
void () { addTest("p+p", "<p></p><p></p>"); addTest("p+P", "<p></p><P></P>"); addTest("p.name+p+p", "<p class=\"name\"></p><p></p><p></p>"); }
|
addPlusOperatorTests
|
300,675
|
void () { addTest("p>em", "<p><em></em></p>"); addTest("p.hello>em.world>span", "<p class=\"hello\"><em class=\"world\"><span></span></em></p>"); }
|
addGreaterThanOperatorTests
|
300,676
|
void () { addTest("p.name", "<p class=\"name\"></p>"); addTest("p.one.two.three", "<p class=\"one two three\"></p>"); addTest("p.one-two.three", "<p class=\"one-two three\"></p>"); addTest("p.one.two-three", "<p class=\"one two-three\"></p>"); addTest("p.one_two-three", "<p class=\"one_two-three\"></p>"); addTest("p#myid", "<p id=\"myid\"></p>"); addTest("p#myid.name_with-dash32.otherclass", "<p id=\"myid\" class=\"name_with-dash32 otherclass\"></p>"); addTest("span.one.two.three", "<span class=\"one two three\"></span>"); addTest("span.one#two", "<span class=\"one\" id=\"two\"></span>"); addTest("span.one.two#three", "<span class=\"one two\" id=\"three\"></span>"); addTest("span[title]", "<span title=\"\"></span>"); addTest("span[title data]", "<span title=\"\" data=\"\"></span>"); addTest("span.test[title data]", "<span class=\"test\" title=\"\" data=\"\"></span>"); addTest("span#one.two[title data]", "<span id=\"one\" class=\"two\" title=\"\" data=\"\"></span>"); addTest("span[title=Hello]", "<span title=\"Hello\"></span>"); addTest("span[title=\"Hello world\"]", "<span title=\"Hello world\"></span>"); addTest("span[title=\"Hello world\"]", "<span title=\"Hello world\"></span>"); addTest("span[title=\"Hello world\" data=other]", "<span title=\"Hello world\" data=\"other\"></span>"); addTest("span[title=\"Hello world\" data=other attr2 attr3]", "<span title=\"Hello world\" data=\"other\" attr2=\"\" attr3=\"\"></span>"); addTest("span[title=\"Hello world\" data=other attr2 attr3]>em", "<span title=\"Hello world\" data=\"other\" attr2=\"\" attr3=\"\"><em></em></span>"); addTest("filelist[id=javascript.files]", "<filelist id=\"javascript.files\"></filelist>"); }
|
addAttributesOperatorTests
|
300,677
|
void () { addTest("a[\"text.html\"]", "<a href=\"text.html\"></a>"); addTest("a['text.html']", "<a href=\"text.html\"></a>"); addTest("a[text.html]", "<a href=\"text.html\"></a>"); addTest("a[http://google.com title=Google]", "<a href=\"http://google.com\" title=\"Google\"></a>"); addTest("a[title=Google http://google.com]", "<a href=\"http://google.com\" title=\"Google\"></a>"); addTest("img[image.png]", "<img src=\"image.png\" alt=\"\">"); addTest("link[style.css]", "<link rel=\"stylesheet\" href=\"style.css\">"); addTest("script", "<script></script>"); addTest("script[src]", "<script src=\"\"></script>"); addTest("script[file.js]", "<script src=\"file.js\"></script>"); addTest("script[/packages/requiejs/require.js]", "<script src=\"/packages/requiejs/require.js\"></script>"); addTest("al", "<a></a>"); addTest("al[file.html]", "<a href=\"http://file.html\"></a>"); addTest("al2", "<a !href></a>"); addTest("al2[file.html]", "<a !href></a>"); }
|
addDefaultAttributesTests
|
300,678
|
void () { addTestWithInit("1. div.cls", "1. <div class=\"cls\"></div>", quoteStyle(CodeStyleSettings.QuoteStyle.Double)); addTestWithInit("2. div.cls", "2. <div class='cls'></div>", quoteStyle(CodeStyleSettings.QuoteStyle.Single)); addTestWithInit("3. div.cls", "3. <div class=\"cls\"></div>", quoteStyle(CodeStyleSettings.QuoteStyle.None)); }
|
addQuotesTests
|
300,679
|
void () { addTestWithInit("track[default]", "<track default>", compactBooleanAllowed(true)); addTestWithInit("track[default=customValue]", "<track default=\"customValue\">", compactBooleanAllowed(true)); addTestWithInit("div.editor[a. title=test]", "<div class=\"editor\" a title=\"test\">|</div>", compactBooleanAllowed(true)); addTestWithInit("b[a.]", "<b a=\"a\"></b>", compactBooleanAllowed(false)); addTestWithInit("track[default]", "<track default=\"default\">", compactBooleanAllowed(false)); addTestWithInit("button:d", "<button disabled></button>", compactBooleanAllowed(true)); addTestWithInit("button:d", "<button disabled=\"disabled\"></button>", compactBooleanAllowed(false)); addTestWithInit("input[title]", "<input type=\"text\" title=\"\">", null); addTestWithInit("input[title]", "<input type=\"text\" title>", (fixture, testRootDisposable) -> { final HtmlUnknownBooleanAttributeInspection inspection = new HtmlUnknownBooleanAttributeInspection(); inspection.updateAdditionalEntries("title", testRootDisposable); fixture.enableInspections(inspection); }); }
|
addBooleanAttributesTests
|
300,680
|
void () { addTestWithPositionCheck("tr>td+td+td", """ <tr> <td>|</td> <td>|</td> <td>|</td> </tr>""", withAddEndEditPoint(false)); addTestWithPositionCheck("tr>td+td+td", """ <tr> <td>|</td> <td>|</td> <td>|</td> </tr>|""", withAddEndEditPoint(true)); }
|
addEndVariableTests
|
300,681
|
TestInitializer (final boolean value) { return (fixture, testRootDisposable) -> { final boolean oldValue = EmmetOptions.getInstance().isAddEditPointAtTheEndOfTemplate(); EmmetOptions.getInstance().setAddEditPointAtTheEndOfTemplate(value); Disposer.register(testRootDisposable, () -> EmmetOptions.getInstance().setAddEditPointAtTheEndOfTemplate(oldValue)); }; }
|
withAddEndEditPoint
|
300,682
|
void () { addTest("dl+", "<dl><dt></dt><dd></dd></dl>"); addTest("div+div>dl+", "<div></div><div><dl><dt></dt><dd></dd></dl></div>"); }
|
addExpandosTests
|
300,683
|
void () { addTest("h$", "<h0></h0>"); addTest("h$.item$", "<h0 class=\"item0\"></h0>"); addTest("h$.item$*3", "<h1 class=\"item1\"></h1><h2 class=\"item2\"></h2><h3 class=\"item3\"></h3>"); addTest("h$.item${text $$$}*3", "<h1 class=\"item1\">text 001</h1><h2 class=\"item2\">text 002</h2><h3 class=\"item3\">text 003</h3>"); addTest("h$*3>b$", "<h1><b1></b1></h1><h2><b2></b2></h2><h3><b3></b3></h3>"); addTest("ul#nav>li.item$*3", "<ul id=\"nav\"><li class=\"item1\"></li><li class=\"item2\"></li><li class=\"item3\"></li></ul>"); addTest("ul#nav>li.item$$$*3", "<ul id=\"nav\"><li class=\"item001\"></li><li class=\"item002\"></li><li class=\"item003\"></li></ul>"); addTest("ul#nav>li.$$item$$$*3", "<ul id=\"nav\"><li class=\"01item001\"></li><li class=\"02item002\"></li><li class=\"03item003\"></li></ul>"); addTest("ul#nav>li.pre$*3+li.post$*3", "<ul id=\"nav\"><li class=\"pre1\"></li><li class=\"pre2\"></li><li class=\"pre3\"></li><li class=\"post1\"></li><li class=\"post2\"></li><li class=\"post3\"></li></ul>"); addTest(".sample$*3", "<div class=\"sample1\"></div><div class=\"sample2\"></div><div class=\"sample3\"></div>"); addTest("ul#nav>li{text}*3", "<ul id=\"nav\"><li>text</li><li>text</li><li>text</li></ul>"); addTest("p{Max Length Error: {{myForm.sample.$error.maxlength}}}", "<p>Max Length Error: {{myForm.sample.0error.maxlength}}</p>"); addTest("p{Max Length Error: {{myForm.sample.\\$error.maxlength}}}", "<p>Max Length Error: {{myForm.sample.$error.maxlength}}</p>"); addTest("p{Max Length Error: {{myForm.sample.\\\\$error.maxlength}}}", "<p>Max Length Error: {{myForm.sample.\\0error.maxlength}}</p>"); // counter base addTest("{$@3 }*3", "3 4 5 "); addTest("{$@- }*3", "3 2 1 "); addTest("{$@-5 }*3", "7 6 5 "); addTest("{$$@-5 }*3", "07 06 05 "); // numbering from groups addTest("(span.i$)*3", "<span class=\"i1\"></span><span class=\"i2\"></span><span class=\"i3\"></span>"); addTest("p.p$*2>(i.i$+b.b$)*3", "<p class=\"p1\"><i class=\"i1\"></i><b class=\"b1\"></b><i class=\"i2\"></i><b class=\"b2\"></b><i class=\"i3\"></i><b class=\"b3\"></b></p><p class=\"p2\"><i class=\"i1\"></i><b class=\"b1\"></b><i class=\"i2\"></i><b class=\"b2\"></b><i class=\"i3\"></i><b class=\"b3\"></b></p>"); addTest("(p.i$+ul>li.i$*2>span.s$)*3", "<p class=\"i1\"></p><ul><li class=\"i1\"><span class=\"s1\"></span></li><li class=\"i2\"><span class=\"s2\"></span></li></ul><p class=\"i2\"></p><ul><li class=\"i1\"><span class=\"s1\"></span></li><li class=\"i2\"><span class=\"s2\"></span></li></ul><p class=\"i3\"></p><ul><li class=\"i1\"><span class=\"s1\"></span></li><li class=\"i2\"><span class=\"s2\"></span></li></ul>"); // skip repeater replace addTest("span[class=item\\$]*2", "<span class=\"item$\"></span><span class=\"item$\"></span>"); addTest("span{item \\$}*2", "<span>item $</span><span>item $</span>"); // add offset to numbering addTest("span.item$@3*2", "<span class=\"item3\"></span><span class=\"item4\"></span>"); addTest("span.item$$@3*2", "<span class=\"item03\"></span><span class=\"item04\"></span>"); addTest("span.item$@*2", "<span class=\"item1\"></span><span class=\"item2\"></span>"); // numbering in descending order addTest("span.item$@-*2", "<span class=\"item2\"></span><span class=\"item1\"></span>"); addTest("span.item$@-3*2", "<span class=\"item4\"></span><span class=\"item3\"></span>"); addTest("span.item$@-9*2", "<span class=\"item10\"></span><span class=\"item9\"></span>"); addTest("span.item$$@-9*2", "<span class=\"item10\"></span><span class=\"item09\"></span>"); addTest("span$.item$@-*2", "<span1 class=\"item2\"></span1><span2 class=\"item1\"></span2>"); }
|
addCounterTests
|
300,684
|
void () { // variables on empty attributes addTestWithPositionCheck("ul[a]>li[b=]>div[b=\"\"]+div[a=\"a\"]+div.", """ <ul a="|"> <li b="|"> <div b="|">|</div> <div a="a">|</div> <div class="|">|</div> </li> </ul>"""); addTest("some:elem", "<some:elem></some:elem>"); addTest("li#id$.class$*3", "<li id=\"id1\" class=\"class1\"></li><li id=\"id2\" class=\"class2\"></li><li id=\"id3\" class=\"class3\"></li>"); addTest("select#test", "<select name=\"\" id=\"test\"></select>"); addTest("h${Header $}*3", "<h1>Header 1</h1><h2>Header 2</h2><h3>Header 3</h3>"); }
|
addOtherTests
|
300,685
|
void () { addTest("div#head+(p>p)+div#footer", "<div id=\"head\"></div><p>\n<p></p>\n</p><div id=\"footer\"></div>"); addTest("div#head>((ul#nav>li*3)+(div.subnav>p)+(div.othernav))+div#footer", "<div id=\"head\"><ul id=\"nav\"><li></li><li></li><li></li></ul><div class=\"subnav\">\n<p></p>\n</div><div class=\"othernav\"></div><div id=\"footer\"></div></div>"); addTest("div#head>(ul#nav>li*3>(div.subnav>p)+(div.othernav))+div#footer", "<div id=\"head\"><ul id=\"nav\"><li><div class=\"subnav\">\n<p></p>\n</div><div class=\"othernav\"></div></li><li><div class=\"subnav\">\n<p></p>\n</div><div class=\"othernav\"></div></li><li><div class=\"subnav\">\n<p></p>\n</div><div class=\"othernav\"></div></li></ul><div id=\"footer\"></div></div>"); addTest("ul>li.pre$*2+(li.item$*4>a)+li.post$*2", "<ul><li class=\"pre1\"></li><li class=\"pre2\"></li><li class=\"item1\"><a href=\"\"></a></li><li class=\"item2\"><a href=\"\"></a></li><li class=\"item3\"><a href=\"\"></a></li><li class=\"item4\"><a href=\"\"></a></li><li class=\"post1\"></li><li class=\"post2\"></li></ul>"); addTest("div>(i+b)*2+(span+em)*3", "<div><i></i><b></b><i></i><b></b><span></span><em></em><span></span><em></em><span></span><em></em></div>"); }
|
addGroupTests
|
300,686
|
void () { addTest("(span.i$)*3", "<span class=\"i1\"></span><span class=\"i2\"></span><span class=\"i3\"></span>"); addTest("p.p$*2>(i.i$+b.b$)*3", "<p class=\"p1\"><i class=\"i1\"></i><b class=\"b1\"></b><i class=\"i2\"></i><b class=\"b2\"></b><i class=\"i3\"></i><b class=\"b3\"></b></p><p class=\"p2\"><i class=\"i1\"></i><b class=\"b1\"></b><i class=\"i2\"></i><b class=\"b2\"></b><i class=\"i3\"></i><b class=\"b3\"></b></p>"); addTest("(p.i$+ul>li.i$*2>span.s$)*3", "<p class=\"i1\"></p><ul><li class=\"i1\"><span class=\"s1\"></span></li><li class=\"i2\"><span class=\"s2\"></span></li></ul><p class=\"i2\"></p><ul><li class=\"i1\"><span class=\"s1\"></span></li><li class=\"i2\"><span class=\"s2\"></span></li></ul><p class=\"i3\"></p><ul><li class=\"i1\"><span class=\"s1\"></span></li><li class=\"i2\"><span class=\"s2\"></span></li></ul>"); }
|
addGroupMultiplicationTests
|
300,687
|
void () { addTest("#content", "<div id=\"content\"></div>"); addTest(".content", "<div class=\"content\"></div>"); addTest("#content.demo", "<div id=\"content\" class=\"demo\"></div>"); addTest(".demo[title=test]", "<div class=\"demo\" title=\"test\"></div>"); addTest("#some_id>.some_class", "<div id=\"some_id\"><div class=\"some_class\"></div></div>"); addTest("ul>.item", "<ul><li class=\"item\"></li></ul>"); addTest("ol>.", "<ol><li class=\"\"></li></ol>"); addTest("em>.", "<em><span class=\"\"></span></em>"); addTest("table>#row$*4>[colspan=2]", """ <table> \t<tr id="row1"> \t\t<td colspan="2"></td> \t</tr> \t<tr id="row2"> \t\t<td colspan="2"></td> \t</tr> \t<tr id="row3"> \t\t<td colspan="2"></td> \t</tr> \t<tr id="row4"> \t\t<td colspan="2"></td> \t</tr> </table>"""); addTest("<ul>.cls<caret></ul>", "<ul><li class=\"cls\"></li></ul>"); addTest("<ul>.cls>.cls^.cls<caret></ul>", "<ul><li class=\"cls\"><div class=\"cls\"></div></li><li class=\"cls\"></li></ul>"); addTest("<ul>.cls>.cls^^.cls<caret></ul>", "<ul><li class=\"cls\"><div class=\"cls\"></div></li><li class=\"cls\"></li></ul>"); }
|
addImpliedTagNameTests
|
300,688
|
void () { addTest("span>{Hello world}", "<span>Hello world</span>"); addTest("span{Hello world}", "<span>Hello world</span>"); addTest("span>{Hello}+{ world}", "<span>Hello world</span>"); addTest("span>{Click }+(a[href=/url/]{here})+{ for more info}", "<span>Click <a href=\"/url/\">here</a> for more info</span>"); }
|
addTextNodesTests
|
300,689
|
void () { addTest("p>em^div", "<p><em></em></p><div></div>"); addTest("p>em>span^^div", "<p><em><span></span></em></p><div></div>"); addTest("p>em>span^^^^div", "<p><em><span></span></em></p><div></div>"); }
|
addClimbUpOperatorTests
|
300,690
|
void (String source, String expected) { addTest(source, expected, "html"); }
|
addTest
|
300,691
|
void (String source, String expected, @Nullable TestInitializer setUp) { addTest(source, expected, setUp, "html"); }
|
addTestWithInit
|
300,692
|
void (String source, String expected) { addTestWithPositionCheck(source, expected, "html"); }
|
addTestWithPositionCheck
|
300,693
|
void (String source, String expected, @Nullable TestInitializer setUp) { addTestWithPositionCheck(source, expected, setUp, "html"); }
|
addTestWithPositionCheck
|
300,694
|
TestInitializer (final boolean compactBooleanAllowed) { return (fixture, testRootDisposable) -> HtmlUtil .setShortNotationOfBooleanAttributeIsPreferred(compactBooleanAllowed, testRootDisposable); }
|
compactBooleanAllowed
|
300,695
|
String () { return Joiner.on(File.separatorChar).join(XmlTestUtil.getXmlTestDataPath(), "codeInsight", "template", "emmet", "abbreviation"); }
|
getTestDataPath
|
300,696
|
void () { addTest("tmatch", "<xsl:template match=\"\" mode=\"\"></xsl:template>", "xsl"); addTest("choose", "<xsl:choose><xsl:when test=\"\"></xsl:when><xsl:otherwise></xsl:otherwise></xsl:choose>", "xsl"); addTest("xsl:variable>div+p", "<xsl:variable><div></div><p></p></xsl:variable>", "xsl"); addTest("var>div+p", "<xsl:variable name=\"\"><div></div><p></p></xsl:variable>", "xsl"); addTest("ap", "<xsl:apply-templates select=\"\" mode=\"\" />", "xsl"); addTest("ap>wp*2", "<xsl:apply-templates select=\"\" mode=\"\"><xsl:with-param name=\"\" select=\"\" /><xsl:with-param name=\"\" select=\"\" /></xsl:apply-templates>", "xsl"); }
|
addXslTests
|
300,697
|
String () { return Joiner.on(File.separatorChar).join(XmlTestUtil.getXmlTestDataPath(), "codeInsight", "template", "emmet", "abbreviation"); }
|
getTestDataPath
|
300,698
|
void () { expand("lipsum"); assertWordCount(getFile().getText(), 30); }
|
testExpandLipsum
|
300,699
|
void () { expand("lorem10"); assertWordCount(getFile().getText(), 10); }
|
testExpandLoremWithWordCount
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.