github.com/nevalang/neva@v0.23.1-0.20240507185603-7696a9bb8dda/e2e/99_bottles_with_chain/e2e_test.go (about) 1 package test 2 3 import ( 4 "os/exec" 5 "testing" 6 7 "github.com/stretchr/testify/require" 8 ) 9 10 func Test(t *testing.T) { 11 cmd := exec.Command("neva", "run", "main") 12 13 out, err := cmd.CombinedOutput() 14 require.NoError(t, err) 15 16 require.Equal( 17 t, 18 expected, 19 string(out), 20 ) 21 22 require.Equal(t, 0, cmd.ProcessState.ExitCode()) 23 } 24 25 var expected = `99 bottles of beer on the wall, 99 bottles of beer. 26 Take one down and pass it around, 98 bottles of beer on the wall. 27 28 98 bottles of beer on the wall, 98 bottles of beer. 29 Take one down and pass it around, 97 bottles of beer on the wall. 30 31 97 bottles of beer on the wall, 97 bottles of beer. 32 Take one down and pass it around, 96 bottles of beer on the wall. 33 34 96 bottles of beer on the wall, 96 bottles of beer. 35 Take one down and pass it around, 95 bottles of beer on the wall. 36 37 95 bottles of beer on the wall, 95 bottles of beer. 38 Take one down and pass it around, 94 bottles of beer on the wall. 39 40 94 bottles of beer on the wall, 94 bottles of beer. 41 Take one down and pass it around, 93 bottles of beer on the wall. 42 43 93 bottles of beer on the wall, 93 bottles of beer. 44 Take one down and pass it around, 92 bottles of beer on the wall. 45 46 92 bottles of beer on the wall, 92 bottles of beer. 47 Take one down and pass it around, 91 bottles of beer on the wall. 48 49 91 bottles of beer on the wall, 91 bottles of beer. 50 Take one down and pass it around, 90 bottles of beer on the wall. 51 52 90 bottles of beer on the wall, 90 bottles of beer. 53 Take one down and pass it around, 89 bottles of beer on the wall. 54 55 89 bottles of beer on the wall, 89 bottles of beer. 56 Take one down and pass it around, 88 bottles of beer on the wall. 57 58 88 bottles of beer on the wall, 88 bottles of beer. 59 Take one down and pass it around, 87 bottles of beer on the wall. 60 61 87 bottles of beer on the wall, 87 bottles of beer. 62 Take one down and pass it around, 86 bottles of beer on the wall. 63 64 86 bottles of beer on the wall, 86 bottles of beer. 65 Take one down and pass it around, 85 bottles of beer on the wall. 66 67 85 bottles of beer on the wall, 85 bottles of beer. 68 Take one down and pass it around, 84 bottles of beer on the wall. 69 70 84 bottles of beer on the wall, 84 bottles of beer. 71 Take one down and pass it around, 83 bottles of beer on the wall. 72 73 83 bottles of beer on the wall, 83 bottles of beer. 74 Take one down and pass it around, 82 bottles of beer on the wall. 75 76 82 bottles of beer on the wall, 82 bottles of beer. 77 Take one down and pass it around, 81 bottles of beer on the wall. 78 79 81 bottles of beer on the wall, 81 bottles of beer. 80 Take one down and pass it around, 80 bottles of beer on the wall. 81 82 80 bottles of beer on the wall, 80 bottles of beer. 83 Take one down and pass it around, 79 bottles of beer on the wall. 84 85 79 bottles of beer on the wall, 79 bottles of beer. 86 Take one down and pass it around, 78 bottles of beer on the wall. 87 88 78 bottles of beer on the wall, 78 bottles of beer. 89 Take one down and pass it around, 77 bottles of beer on the wall. 90 91 77 bottles of beer on the wall, 77 bottles of beer. 92 Take one down and pass it around, 76 bottles of beer on the wall. 93 94 76 bottles of beer on the wall, 76 bottles of beer. 95 Take one down and pass it around, 75 bottles of beer on the wall. 96 97 75 bottles of beer on the wall, 75 bottles of beer. 98 Take one down and pass it around, 74 bottles of beer on the wall. 99 100 74 bottles of beer on the wall, 74 bottles of beer. 101 Take one down and pass it around, 73 bottles of beer on the wall. 102 103 73 bottles of beer on the wall, 73 bottles of beer. 104 Take one down and pass it around, 72 bottles of beer on the wall. 105 106 72 bottles of beer on the wall, 72 bottles of beer. 107 Take one down and pass it around, 71 bottles of beer on the wall. 108 109 71 bottles of beer on the wall, 71 bottles of beer. 110 Take one down and pass it around, 70 bottles of beer on the wall. 111 112 70 bottles of beer on the wall, 70 bottles of beer. 113 Take one down and pass it around, 69 bottles of beer on the wall. 114 115 69 bottles of beer on the wall, 69 bottles of beer. 116 Take one down and pass it around, 68 bottles of beer on the wall. 117 118 68 bottles of beer on the wall, 68 bottles of beer. 119 Take one down and pass it around, 67 bottles of beer on the wall. 120 121 67 bottles of beer on the wall, 67 bottles of beer. 122 Take one down and pass it around, 66 bottles of beer on the wall. 123 124 66 bottles of beer on the wall, 66 bottles of beer. 125 Take one down and pass it around, 65 bottles of beer on the wall. 126 127 65 bottles of beer on the wall, 65 bottles of beer. 128 Take one down and pass it around, 64 bottles of beer on the wall. 129 130 64 bottles of beer on the wall, 64 bottles of beer. 131 Take one down and pass it around, 63 bottles of beer on the wall. 132 133 63 bottles of beer on the wall, 63 bottles of beer. 134 Take one down and pass it around, 62 bottles of beer on the wall. 135 136 62 bottles of beer on the wall, 62 bottles of beer. 137 Take one down and pass it around, 61 bottles of beer on the wall. 138 139 61 bottles of beer on the wall, 61 bottles of beer. 140 Take one down and pass it around, 60 bottles of beer on the wall. 141 142 60 bottles of beer on the wall, 60 bottles of beer. 143 Take one down and pass it around, 59 bottles of beer on the wall. 144 145 59 bottles of beer on the wall, 59 bottles of beer. 146 Take one down and pass it around, 58 bottles of beer on the wall. 147 148 58 bottles of beer on the wall, 58 bottles of beer. 149 Take one down and pass it around, 57 bottles of beer on the wall. 150 151 57 bottles of beer on the wall, 57 bottles of beer. 152 Take one down and pass it around, 56 bottles of beer on the wall. 153 154 56 bottles of beer on the wall, 56 bottles of beer. 155 Take one down and pass it around, 55 bottles of beer on the wall. 156 157 55 bottles of beer on the wall, 55 bottles of beer. 158 Take one down and pass it around, 54 bottles of beer on the wall. 159 160 54 bottles of beer on the wall, 54 bottles of beer. 161 Take one down and pass it around, 53 bottles of beer on the wall. 162 163 53 bottles of beer on the wall, 53 bottles of beer. 164 Take one down and pass it around, 52 bottles of beer on the wall. 165 166 52 bottles of beer on the wall, 52 bottles of beer. 167 Take one down and pass it around, 51 bottles of beer on the wall. 168 169 51 bottles of beer on the wall, 51 bottles of beer. 170 Take one down and pass it around, 50 bottles of beer on the wall. 171 172 50 bottles of beer on the wall, 50 bottles of beer. 173 Take one down and pass it around, 49 bottles of beer on the wall. 174 175 49 bottles of beer on the wall, 49 bottles of beer. 176 Take one down and pass it around, 48 bottles of beer on the wall. 177 178 48 bottles of beer on the wall, 48 bottles of beer. 179 Take one down and pass it around, 47 bottles of beer on the wall. 180 181 47 bottles of beer on the wall, 47 bottles of beer. 182 Take one down and pass it around, 46 bottles of beer on the wall. 183 184 46 bottles of beer on the wall, 46 bottles of beer. 185 Take one down and pass it around, 45 bottles of beer on the wall. 186 187 45 bottles of beer on the wall, 45 bottles of beer. 188 Take one down and pass it around, 44 bottles of beer on the wall. 189 190 44 bottles of beer on the wall, 44 bottles of beer. 191 Take one down and pass it around, 43 bottles of beer on the wall. 192 193 43 bottles of beer on the wall, 43 bottles of beer. 194 Take one down and pass it around, 42 bottles of beer on the wall. 195 196 42 bottles of beer on the wall, 42 bottles of beer. 197 Take one down and pass it around, 41 bottles of beer on the wall. 198 199 41 bottles of beer on the wall, 41 bottles of beer. 200 Take one down and pass it around, 40 bottles of beer on the wall. 201 202 40 bottles of beer on the wall, 40 bottles of beer. 203 Take one down and pass it around, 39 bottles of beer on the wall. 204 205 39 bottles of beer on the wall, 39 bottles of beer. 206 Take one down and pass it around, 38 bottles of beer on the wall. 207 208 38 bottles of beer on the wall, 38 bottles of beer. 209 Take one down and pass it around, 37 bottles of beer on the wall. 210 211 37 bottles of beer on the wall, 37 bottles of beer. 212 Take one down and pass it around, 36 bottles of beer on the wall. 213 214 36 bottles of beer on the wall, 36 bottles of beer. 215 Take one down and pass it around, 35 bottles of beer on the wall. 216 217 35 bottles of beer on the wall, 35 bottles of beer. 218 Take one down and pass it around, 34 bottles of beer on the wall. 219 220 34 bottles of beer on the wall, 34 bottles of beer. 221 Take one down and pass it around, 33 bottles of beer on the wall. 222 223 33 bottles of beer on the wall, 33 bottles of beer. 224 Take one down and pass it around, 32 bottles of beer on the wall. 225 226 32 bottles of beer on the wall, 32 bottles of beer. 227 Take one down and pass it around, 31 bottles of beer on the wall. 228 229 31 bottles of beer on the wall, 31 bottles of beer. 230 Take one down and pass it around, 30 bottles of beer on the wall. 231 232 30 bottles of beer on the wall, 30 bottles of beer. 233 Take one down and pass it around, 29 bottles of beer on the wall. 234 235 29 bottles of beer on the wall, 29 bottles of beer. 236 Take one down and pass it around, 28 bottles of beer on the wall. 237 238 28 bottles of beer on the wall, 28 bottles of beer. 239 Take one down and pass it around, 27 bottles of beer on the wall. 240 241 27 bottles of beer on the wall, 27 bottles of beer. 242 Take one down and pass it around, 26 bottles of beer on the wall. 243 244 26 bottles of beer on the wall, 26 bottles of beer. 245 Take one down and pass it around, 25 bottles of beer on the wall. 246 247 25 bottles of beer on the wall, 25 bottles of beer. 248 Take one down and pass it around, 24 bottles of beer on the wall. 249 250 24 bottles of beer on the wall, 24 bottles of beer. 251 Take one down and pass it around, 23 bottles of beer on the wall. 252 253 23 bottles of beer on the wall, 23 bottles of beer. 254 Take one down and pass it around, 22 bottles of beer on the wall. 255 256 22 bottles of beer on the wall, 22 bottles of beer. 257 Take one down and pass it around, 21 bottles of beer on the wall. 258 259 21 bottles of beer on the wall, 21 bottles of beer. 260 Take one down and pass it around, 20 bottles of beer on the wall. 261 262 20 bottles of beer on the wall, 20 bottles of beer. 263 Take one down and pass it around, 19 bottles of beer on the wall. 264 265 19 bottles of beer on the wall, 19 bottles of beer. 266 Take one down and pass it around, 18 bottles of beer on the wall. 267 268 18 bottles of beer on the wall, 18 bottles of beer. 269 Take one down and pass it around, 17 bottles of beer on the wall. 270 271 17 bottles of beer on the wall, 17 bottles of beer. 272 Take one down and pass it around, 16 bottles of beer on the wall. 273 274 16 bottles of beer on the wall, 16 bottles of beer. 275 Take one down and pass it around, 15 bottles of beer on the wall. 276 277 15 bottles of beer on the wall, 15 bottles of beer. 278 Take one down and pass it around, 14 bottles of beer on the wall. 279 280 14 bottles of beer on the wall, 14 bottles of beer. 281 Take one down and pass it around, 13 bottles of beer on the wall. 282 283 13 bottles of beer on the wall, 13 bottles of beer. 284 Take one down and pass it around, 12 bottles of beer on the wall. 285 286 12 bottles of beer on the wall, 12 bottles of beer. 287 Take one down and pass it around, 11 bottles of beer on the wall. 288 289 11 bottles of beer on the wall, 11 bottles of beer. 290 Take one down and pass it around, 10 bottles of beer on the wall. 291 292 10 bottles of beer on the wall, 10 bottles of beer. 293 Take one down and pass it around, 9 bottles of beer on the wall. 294 295 9 bottles of beer on the wall, 9 bottles of beer. 296 Take one down and pass it around, 8 bottles of beer on the wall. 297 298 8 bottles of beer on the wall, 8 bottles of beer. 299 Take one down and pass it around, 7 bottles of beer on the wall. 300 301 7 bottles of beer on the wall, 7 bottles of beer. 302 Take one down and pass it around, 6 bottles of beer on the wall. 303 304 6 bottles of beer on the wall, 6 bottles of beer. 305 Take one down and pass it around, 5 bottles of beer on the wall. 306 307 5 bottles of beer on the wall, 5 bottles of beer. 308 Take one down and pass it around, 4 bottles of beer on the wall. 309 310 4 bottles of beer on the wall, 4 bottles of beer. 311 Take one down and pass it around, 3 bottles of beer on the wall. 312 313 3 bottles of beer on the wall, 3 bottles of beer. 314 Take one down and pass it around, 2 bottles of beer on the wall. 315 316 2 bottles of beer on the wall, 2 bottles of beer. 317 Take one down and pass it around, 1 bottle of beer on the wall. 318 319 1 bottle of beer on the wall, 1 bottle of beer. 320 Take one down and pass it around, no more bottles of beer on the wall. 321 322 No more bottles of beer on the wall, no more bottles of beer. 323 Go to the store and buy some more, 99 bottles of beer on the wall. 324 `