Unnamed: 0
int64 0
305k
| body
stringlengths 7
52.9k
| name
stringlengths 1
185
|
|---|---|---|
14,400
|
void () { doTest(); }
|
testIfEnd
|
14,401
|
void () { doTest(); }
|
testWhile
|
14,402
|
void () { doTest(); }
|
testUntil
|
14,403
|
void () { doTest(); }
|
testFor
|
14,404
|
void () { doTest(); }
|
testCaseClause
|
14,405
|
void () { doTest(); }
|
testCaseEnd
|
14,406
|
void () { doTest(); }
|
testCasePattern
|
14,407
|
void () { doTest(); }
|
testIndentAtBeginOfFile
|
14,408
|
void () { doTest(); }
|
testInternationalization
|
14,409
|
void () { String testName = getTestName(true); myFixture.configureByFile(testName + FILE_EXTENSION); myFixture.type(KEY_ENTER); myFixture.checkResultByFile(testName + AFTER_FILE_EXTENSION); }
|
doTest
|
14,410
|
String () { return PluginPathManager.getPluginHomePath("sh") + "/core/testData/rename/"; }
|
getTestDataPath
|
14,411
|
void () { doTest("MY_NAME"); }
|
testBasic1
|
14,412
|
void () { doTest(null); }
|
testBasic2
|
14,413
|
void () { doTest("command -v"); }
|
testBasic3
|
14,414
|
void () { doTest("Bye"); }
|
testSelection1
|
14,415
|
void () { doTest("zsh"); }
|
testSelection2
|
14,416
|
void () { doTest("m"); }
|
testSelection3
|
14,417
|
void () { doTest("4]]"); }
|
testSelection4
|
14,418
|
void () { doTest("bash"); }
|
testNotFunction
|
14,419
|
void () { doTest(null); }
|
testKeyword1
|
14,420
|
void () { doTest(null); }
|
testKeyword2
|
14,421
|
void () { ShHighlightUsagesTest.suppressOccurrences(getTestRootDisposable()); doTest(null); }
|
testSuppressedRename
|
14,422
|
void (@Nullable String newName) { configureByFile(getTestName(true) + "-before.sh"); TemplateManagerImpl.setTemplateTesting(getTestRootDisposable()); executeRenameAction(newName != null); TemplateState templateState = TemplateManagerImpl.getTemplateState(getEditor()); if (newName != null) { assertNotNull(templateState); } else { assertNull(templateState); return; } assertFalse(templateState.isFinished()); type(newName); templateState.gotoEnd(); checkResultByFile(getTestName(true) + "-after.sh"); doTestWithPlainTextRenamer(newName); }
|
doTest
|
14,423
|
void (boolean expectEnabled) { try { executeAction(IdeActions.ACTION_RENAME); } catch (AssertionError e) { if (expectEnabled) { throw e; } } }
|
executeRenameAction
|
14,424
|
void (@NotNull String newName) { configureByFile(getTestName(true) + "-before.sh"); runWithoutInplaceRename(() -> { executeAction(IdeActions.ACTION_RENAME); getEditor().getUserData(ShRenameAllOccurrencesHandler.RENAMER_KEY).renameTo(newName); }); checkResultByFile(getTestName(true) + "-after.sh"); }
|
doTestWithPlainTextRenamer
|
14,425
|
void (@NotNull Runnable runnable) { Disposable parentDisposable = Disposer.newDisposable(); ShRenameAllOccurrencesHandler.getMaxInplaceRenameSegmentsRegistryValue().setValue(-1, parentDisposable); try { runnable.run(); } finally { Disposer.dispose(parentDisposable); } }
|
runWithoutInplaceRename
|
14,426
|
String () { return PluginPathManager.getPluginHomePath("sh") + "/core/testData/rename/"; }
|
getTestDataPath
|
14,427
|
void () { doTest("echo"); }
|
testFunctionCaseOne
|
14,428
|
void () { doTest("foo"); }
|
testFunctionCaseTwo
|
14,429
|
void () { doTest("addVersion"); }
|
testFunctionIDEA263122
|
14,430
|
void () { doTest("bar"); }
|
testOverridingFunction
|
14,431
|
void () { doTest("exit"); }
|
testFunctionMultipleCases
|
14,432
|
void () { myFixture.addFileToProject("source.sh", """ #!/bin/zsh source ./target.sh foo"""); myFixture.configureByText("target.sh", """ #!/bin/zsh function <caret>foo() { echo "Simple text" }"""); myFixture.renameElementAtCaret("bar"); myFixture.checkResult("source.sh", """ #!/bin/zsh source ./target.sh bar""", false); myFixture.checkResult(""" #!/bin/zsh function <caret>bar() { echo "Simple text" }"""); }
|
testImportedFunctionRename
|
14,433
|
void (@Nullable String newName) { myFixture.configureByFile(getTestName(true) + ".before.sh"); myFixture.renameElementAtCaret(newName); myFixture.checkResultByFile(getTestName(true) + ".after.sh"); }
|
doTest
|
14,434
|
Path () { return IS_UNDER_TEAMCITY ? Path.of(FileUtil.getTempDirectory(), ShLanguage.INSTANCE.getID()) : Path.of(PathManager.getTempPath(), "plugins", ShLanguage.INSTANCE.getID()); }
|
getShellcheckTestDir
|
14,435
|
String () { return PluginPathManager.getPluginHomePath("sh") + "/core/testData/shellcheck/"; }
|
getTestDataPath
|
14,436
|
void () { doTest(ShSuppressInspectionIntention.class); }
|
testSuppressInspection
|
14,437
|
void () { doTest(ShSuppressInspectionIntention.class); }
|
testSuppressSameInspection
|
14,438
|
void () { doTest(ShQuickFixIntention.class); }
|
testQuickFix
|
14,439
|
void () { configFile(); ShShellcheckInspection inspectionBefore = ShShellcheckInspection.findShShellcheckInspection(myFixture.getFile()); assertEmpty(inspectionBefore.getDisabledInspections()); applyIntentions(ShDisableInspectionIntention.class); checkResult(); ShShellcheckInspection inspectionAfter = ShShellcheckInspection.findShShellcheckInspection(myFixture.getFile()); assertNotEmpty(inspectionAfter.getDisabledInspections()); assertSameElements(inspectionAfter.getDisabledInspections(), Arrays.asList("SC2034", "SC2046")); }
|
testDisableInspection
|
14,440
|
void (Class<? extends IntentionAction> intentionType) { configFile(); applyIntentions(intentionType); checkResult(); }
|
doTest
|
14,441
|
void () { myFixture.enableInspections(new ShShellcheckInspection()); myFixture.configureByFile(getTestName(true) + ".sh"); }
|
configFile
|
14,442
|
void () { myFixture.checkHighlighting(true, false, true); myFixture.checkResultByFile(getTestName(true) + ".after.sh"); }
|
checkResult
|
14,443
|
void (Class<? extends IntentionAction> intentionType) { CaretModel caretModel = myFixture.getEditor().getCaretModel(); List<HighlightInfo> inspections = myFixture.doHighlighting(HighlightSeverity.WEAK_WARNING); while (!inspections.isEmpty()) { inspections.get(0).findRegisteredQuickFix((descriptor, range) -> { IntentionAction action = descriptor.getAction(); if (intentionType.isInstance(action)) { caretModel.moveToOffset(range.getStartOffset()); myFixture.launchAction(action); } return null; }); inspections = myFixture.doHighlighting(HighlightSeverity.WARNING); } }
|
applyIntentions
|
14,444
|
void () { PsiFile file = myFixture.configureByText("test.sh", ""); GlobalSearchScope expected = GlobalSearchScope.filesScope(getProject(), Collections.singletonList(file.getVirtualFile())); assertEquals(expected, file.getResolveScope()); }
|
testResolveScopeShell
|
14,445
|
void () { doTest(); }
|
testCaseOne
|
14,446
|
void () { doTest(); }
|
testCaseTwo
|
14,447
|
void () { doTest(); }
|
testCaseThree
|
14,448
|
void () { doTest(); }
|
testCaseFour
|
14,449
|
void () { doTest(); }
|
testCaseFive
|
14,450
|
void () { doTest("./parent folder/source.sh"); }
|
testCaseSix
|
14,451
|
void () { doTest(); }
|
testCaseNine
|
14,452
|
void () { doTest("source.sh", "source.sh"); }
|
testSameFile
|
14,453
|
void () { doTest(); }
|
testSameFolder
|
14,454
|
void () { doTest(); }
|
testWithParams
|
14,455
|
void () { doNullTest(); }
|
testWithParamsCaseTwo
|
14,456
|
void () { doTest(); }
|
testDotImport
|
14,457
|
void () { myFixture.configureByFile("source.sh"); PsiReference reference = myFixture.getFile().findReferenceAt(myFixture.getCaretOffset()); assertNull(reference.resolve()); }
|
doNullTest
|
14,458
|
void () { doTest( "source.sh", "target.sh"); }
|
doTest
|
14,459
|
void (String filePath) { doTest( filePath, "target.sh"); }
|
doTest
|
14,460
|
void (String filePath, String targetFilePath) { myFixture.configureByFile(filePath); PsiReference reference = myFixture.getFile().findReferenceAt(myFixture.getCaretOffset()); PsiElement targetElement = reference.resolve(); assertNotNull(targetElement); assertTrue(targetElement instanceof PsiFile); assertEquals(targetFilePath, ((PsiFile)targetElement).getVirtualFile().getName()); }
|
doTest
|
14,461
|
String () { return PluginPathManager.getPluginHomePath("sh") + "/core/testData/resolve/function_file_scope"; }
|
getTestDataPath
|
14,462
|
void () { doTest(getFirstFunction); }
|
testSimpleFunction
|
14,463
|
void () { doTest(getFirstFunction); }
|
testFromFunction
|
14,464
|
void () { doTest(getFirstFunction); }
|
testRecursiveFunction
|
14,465
|
void () { doTest(getLastFunction); }
|
testInnerFunction
|
14,466
|
void () { doNullTest(); }
|
testFunctionCaseOne
|
14,467
|
void () { doNullTest(); }
|
testFunctionCaseTwo
|
14,468
|
void () { doNullTest(); }
|
testFunctionCaseThree
|
14,469
|
void () { doTest(getFirstFunction); }
|
testOuterFunctionCaseOne
|
14,470
|
void () { doNullTest(); }
|
testOuterFunctionCaseTwo
|
14,471
|
void () { doNullTest(); }
|
testFunctionUnavailable
|
14,472
|
void () { doTest(getFirstFunction); }
|
testOverridingFunctionCaseOne
|
14,473
|
void () { doTest(getLastFunction); }
|
testOverridingFunctionCaseTwo
|
14,474
|
void () { doTest(getLastFunction); }
|
testOverridingFunctionCaseThree
|
14,475
|
void () { doTest(getFirstFunction); }
|
testOverridingFunctionCaseFour
|
14,476
|
void () { doTest(getLastFunction); }
|
testOverridingFunctionCaseFive
|
14,477
|
void () { doTest(getFirstFunction); }
|
testFunctionCommandSubstitution
|
14,478
|
void () { doNullTest(); }
|
testCaseOne
|
14,479
|
void () { doNullTest(); }
|
testCaseTwo
|
14,480
|
void () { doNullTest(); }
|
testCaseThree
|
14,481
|
void () { doNullTest(); }
|
testCaseFour
|
14,482
|
void () { doTest(getFirstFunction); }
|
testCaseFive
|
14,483
|
void () { doNullTest(); }
|
testCaseSix
|
14,484
|
void () { doNullTest(); }
|
testCaseSeven
|
14,485
|
void () { String testName = getTestName(true); myFixture.configureByFile(testName + ".sh"); }
|
configFile
|
14,486
|
void () { configFile(); PsiReference reference = myFixture.getFile().findReferenceAt(myFixture.getCaretOffset()); assertNull(reference.resolve()); }
|
doNullTest
|
14,487
|
void (Supplier<PsiElement> supplier) { configFile(); PsiReference reference = myFixture.getFile().findReferenceAt(myFixture.getCaretOffset()); PsiElement expectedTarget = supplier.get(); assertNotNull(expectedTarget); assertEquals(expectedTarget.getText(), reference.resolve().getText()); PsiElement targetElement = reference.resolve(); assertSame(expectedTarget, targetElement); }
|
doTest
|
14,488
|
void () { doTest(); }
|
testCaseOne
|
14,489
|
void () { doTest(); }
|
testCaseTwo
|
14,490
|
void () { doTest(); }
|
testCaseThree
|
14,491
|
void () { doTest(); }
|
testCaseFour
|
14,492
|
void () { doTest(); }
|
testCaseFive
|
14,493
|
void () { doTest("./parent folder/source.sh"); }
|
testCaseSix
|
14,494
|
void () { doNullTest(); }
|
testCaseEight
|
14,495
|
void () { doTest(); }
|
testCaseNine
|
14,496
|
void () { doTest(); }
|
testSameFolder
|
14,497
|
void () { doTest(); }
|
testWithParams
|
14,498
|
void () { doNullTest(); }
|
testCyclicImport
|
14,499
|
void () { doNullTest(); }
|
testCyclicImportCaseTwo
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.