Add exercise description onboarding bubble
Remove duplicate IME padding that caused keyboard gap Add md alias for mkdir helper command Add dir alias for ls helper command Add cd.. shortcut for cd .. helper command
This commit is contained in:
@@ -1,5 +1,6 @@
|
||||
package solutions.tretter.githugandroid
|
||||
|
||||
import org.junit.Assert.assertEquals
|
||||
import org.junit.Assert.assertFalse
|
||||
import org.junit.Assert.assertTrue
|
||||
import org.junit.Test
|
||||
@@ -64,4 +65,36 @@ class GitSandboxEngineTest {
|
||||
|
||||
assertTrue(commitHashAnswer("0000001")(repo, "abc1234fedcba9876543210fedcba9876543210"))
|
||||
}
|
||||
|
||||
@Test
|
||||
fun mdIsAcceptedAsMkdirAlias() {
|
||||
val repo = RepoState(initialized = true)
|
||||
|
||||
val (_, output) = GitSandboxEngine.execute(repo, "md src")
|
||||
|
||||
assertTrue(output.isEmpty())
|
||||
}
|
||||
|
||||
@Test
|
||||
fun dirIsAcceptedAsLsAlias() {
|
||||
val repo = RepoState(
|
||||
initialized = true,
|
||||
files = listOf(GitFile("README"), GitFile("src/main.kt")),
|
||||
)
|
||||
|
||||
val (_, output) = GitSandboxEngine.execute(repo, "dir")
|
||||
|
||||
assertTrue("README" in output)
|
||||
assertTrue("src/main.kt" in output)
|
||||
}
|
||||
|
||||
@Test
|
||||
fun cdDotDotShortcutMovesToParentDirectory() {
|
||||
val repo = RepoState(initialized = true, currentDir = "src/main")
|
||||
|
||||
val (updatedRepo, output) = GitSandboxEngine.execute(repo, "cd..")
|
||||
|
||||
assertTrue(output.isEmpty())
|
||||
assertEquals("src", updatedRepo.currentDir)
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user