Open-source, secure environment with real-world tools for enterprise-grade agents.
BuildKit test fixtures
Test data from moby/buildkit v0.26.1
(frontend/dockerfile, Apache License 2.0).
parser/: verbatim copies ofparser/testfiles,parser/testfiles-negativeandparser/testfile-line. Eachresultis theNode.Dump()output of the upstream parser.shell/envVarTest.env.json: the Unix/All lines ofshell/envVarTestwith the upstream expectations verbatim (TestShellParser4EnvVars: the environment isPWD=/home SHELL=bash KOREAN=한국어 NULL=, unset variables expand to an empty string).shell/wordsTest.env.json: the lines ofshell/wordsTestwith theENVlines applied cumulatively, upstream expectations verbatim (TestShellParser4Words, normal mode; unset variables expand to an empty string).shell/processWithMatches.json: theTestProcessWithMatchestable fromshell/lex_test.go(input, environment, expected word or error).shell/: the inputs ofshell/wordsTestandshell/envVarTestwith expectations generated by the upstream lexer in its variable-preserving mode (BuildKit'sSkipUnsetEnvwith an empty environment), which is how this lexer behaves without anenv:lex := shell.NewLex('\\') lex.SkipUnsetEnv = true lex.RawQuotes = rawQuotes // wordsTest.rawQuotes.json env := shell.EnvsFromSlice(nil) word, _, err := lex.ProcessWord(input, env) words, err := lex.ProcessWords(input, env)ProcessWordsupstream loses the text before a${VAR<modifier>...}expression (he${XXX:-000}xx→${XXX:-000}xx): the nestedprocessStopOncall for the modifier resets the shared words buffer. Thewordsof thoseenvVarTest.jsonentries are the intact words, the upstream output is kept asbuildkitWords.