package solutions.tretter.githugandroid /** * Port of the upstream ruby-githug `remote_add` level. * * Setup documents the repository shape the learner explores. Evaluation is kept * state-based whenever the exercise changes repository objects; answer-only * levels intentionally validate the answer entered at the prompt. */ internal fun remoteAddLevel(): Level = level( id = "remote_add", title = "Remote Add", description = "Add a remote repository called `origin` with the url https://github.com/githug/githug", hints = listOf("You can run `git remote --help` for the man pages."), commandSuggestions = listOf("git remote add origin https://github.com/githug/githug"), setup = { RepoState(initialized = true, branches = mapOf("master" to 0)) }, validator = repoPredicate { repo -> repo.remotes["origin"] == "https://github.com/githug/githug" }, testCases = listOf( levelTestCase("add origin remote", "git remote add origin https://github.com/githug/githug"), levelTestCase("add origin remote with tracked branch option", "git remote add -t master origin https://github.com/githug/githug"), ), )