-
-
Notifications
You must be signed in to change notification settings - Fork 0
42 lines (40 loc) · 1.41 KB
/
functional-tests.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
---
name: Functional Tests
on: # yamllint disable-line rule:truthy
push:
branches:
- "main"
pull_request:
jobs:
functional_tests:
name: Run script
timeout-minutes: 5
strategy:
fail-fast: false
matrix:
os: ["ubuntu", "windows", "macos"]
version: ["0.1.dev0", "0.1.dev1"]
runs-on: ${{ matrix.os }}-latest
steps:
- uses: actions/checkout@v4
- uses: ./
with:
version: ${{ matrix.version }}
- name: Validate command (Linux, macOS)
if: ${{ runner.os != 'Windows' }}
run: |
touch ./hello-world.bf
echo "++++++++[>++++[>++>+++>+++>+<<<<-]>+>+>->>+[<]<-]>>.>---.+++++++..+++.>>.<-.<.++" > ./hello-world.bf
echo "+.------.--------.>>+.>++." >> ./hello-world.bf
output=$(brainfucky --file ./hello-world.bf)
rm ./hello-world.bf
[[ "${output:32:12}" == "Hello World!" ]] || exit 1;
shell: bash
- name: Validate command (Windows)
if: ${{ runner.os == 'Windows' }}
run: |
New-Item -Path . -Name "hello-world.bf" -ItemType "file" -Value "++++++++[>++++[>++>+++>+++>+<<<<-]>+>+>->>+[<]<-]>>.>---.+++++++..+++.>>.<-.<.++`n+.------.--------.>>+.>++."
$Output = (brainfucky --file ./hello-world.bf) | Out-String
Remove-Item hello-world.bf
&{If($Output.Substring(33, 12) -ne 'Hello World!') {exit 1}}
shell: pwsh