package solutions.tretter.githugandroid

/**
 * Port of the upstream ruby-githug `grep` 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 grepLevel(): Level = level(
    id = "grep",
    title = "Grep",
    description = "Your project's deadline approaches, you should evaluate how many TODOs are left in your code",
    hints = listOf("You want to research the `git grep` command."),
    commandSuggestions = listOf("git grep TODO"),
    setup = { RepoState(initialized = true, files = listOf(GitFile("app.rb", "# TODO\n# TODO\n# TODO\n# TODO", tracked = true)), branches = mapOf("master" to 1)) },
    validator = commandAnswer("4"),
    testCases = listOf(
        levelTestCase("answer todo count", "4"),
    ),
)
