all repos

scratch @ 78737e5b34dda8993c2c6ae70225d45fb3896607

⭐ me doing recreational ~~drugs~~ programming

scratch/brainfuck/test/gbf_test.gleam (view raw)

Oleksandr Smirnov Oleksandr Smirnov
olexsmir@gmail.com
⭐ gleaming brainfuck, 7 months ago
1
import gbf
2
import gleeunit
3
import gleeunit/should
4
5
pub fn main() -> Nil {
6
  gleeunit.main()
7
}
8
9
pub fn should_run_hello_world_test() {
10
  let input =
11
    "++++++++[>++++[>++>+++>+++>+<<<<-]>+>+>->>+[<]<-]>>.>---.+++++++..+++.>>.<-.<.+++.------.--------.>>+.>++."
12
13
  let assert Ok(bvm) = gbf.run(input)
14
15
  bvm
16
  |> gbf.output
17
  |> should.equal("Hello World!\n")
18
}