package solutions.tretter.githugandroid

/**
 * Port of the upstream ruby-githug `diff` 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 diffLevel(): Level = level(
    id = "diff",
    title = "Diff",
    description = "Since your last commit, file `app.rb` was modified. Find out which line has changed.",
    hints = listOf("You are looking for the difference since your last commit."),
    commandSuggestions = listOf("git diff"),
    setup = { RepoState(initialized = true, files = listOf(GitFile("app.rb", tracked = true)), branches = mapOf("master" to 1)) },
    validator = commandAnswer("26"),
    testCases = listOf(
        levelTestCase("answer changed line", "26"),
    ),
)
