<commit_before>package runner

import "testing"

func assertString(t *testing.T, s1, s2 string) {
	if s1 != s2 {
		t.Errorf("Expected \"%s\", got \"%v\"", s1, s2)
	}
}

func TestEcho(t *testing.T) {
	req := &JobRequest{
		Image: "busybox",
		Cmd:   []string{"echo", "hello world"},
	}
	res := req.Execute(testContainerEngine)
	assertString(t, "hello world", string(res.Stdout))
}

func TestEnv(t *testing.T) {
	env := make(EnvVars, 2)
	env[0] = EnvVar{Key: "K1", Value: "V1"}
	env[1] = EnvVar{Key: "K2", Value: "V2"}
	req := &JobRequest{
		Image: "busybox",
		Cmd:   []string{"env"},
		Env:   env,
	}
	res := req.Execute(testContainerEngine)
	assertString(t, "K1=V1\nK2=V2\n", string(res.Stdout))
}<commit_msg>Fixed spec<commit_after>package runner

import "testing"

func assertString(t *testing.T, s1, s2 string) {
	if s1 != s2 {
		t.Errorf("Expected \"%s\", got \"%v\"", s1, s2)
	}
}

func TestEcho(t *testing.T) {
	req := &JobRequest{
		Image: "busybox",
		Cmd:   []string{"echo", "hello world"},
	}
	res, _ := req.Execute(testContainerEngine)
	assertString(t, "hello world", string(res.Stdout))
}

func TestEnv(t *testing.T) {
	env := make(EnvVars, 2)
	env[0] = EnvVar{Key: "K1", Value: "V1"}
	env[1] = EnvVar{Key: "K2", Value: "V2"}
	req := &JobRequest{
		Image: "busybox",
		Cmd:   []string{"env"},
		Env:   env,
	}
	res, _ := req.Execute(testContainerEngine)
	assertString(t, "K1=V1\nK2=V2", string(res.Stdout))
}
{'fraction_non_alphanumeric': 0.2076002814919071, 'fraction_numerical': 0.023926812104152005, 'mean_word_length': 4.366037735849057, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '1157276', 'n_tokens_mistral': 622, 'n_tokens_neox': 608, 'n_words': 131}