Misc Changes

This commit is contained in:
Joe Tretter
2026-05-06 21:28:44 -05:00
parent 5727022baf
commit e1b2d7f7a1
64 changed files with 1662 additions and 300 deletions

View File

@@ -0,0 +1,21 @@
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"),
),
)