Commit 43e8e777 authored by Giannis Kepas's avatar Giannis Kepas
Browse files

new ci format

parent a468183c
Loading
Loading
Loading
Loading

exercise-1-tests.yml

0 → 100644
+34 −0
Original line number Diff line number Diff line
image: docker:latest

stages:
  - test

setup:
  stage: test
  script:
    - for filename in ./*.sh; do chmod +x "${filename}"; done

test-task-1:
  stage: test
  script:
    - ./os-tests/test/bats/bin/bats os-tests/test/tests/e1-task1.bats

test-task-2:
  stage: test
  script:
    - ./os-tests/test/bats/bin/bats os-tests/test/tests/e1-task2.bats

test-task-3:
  stage: test
  script:
    - ./os-tests/test/bats/bin/bats os-tests/test/tests/e1-task3.bats

test-task-4:
  stage: test
  script:
    - ./os-tests/test/bats/bin/bats os-tests/test/tests/e1-task4.bats

test-task-5:
  stage: test
  script:
    - ./os-tests/test/bats/bin/bats os-tests/test/tests/e1-task5.bats
+21 −0
Original line number Diff line number Diff line
#!/usr/bin/env bats

setup() {
    load 'test_helper/bats-support/load'
    load 'test_helper/bats-assert/load'
}

@test "task 1: should print 'odd' for input '1'" {
    run ./task-1.sh <<< "1"
    assert_output --partial 'odd'
}

@test "task 1: should print 'even' for input '2'" {
    run ./task-1.sh <<< "1"
    assert_output --partial 'odd'
}

@test "task 1: should print 'odd' for input '5'" {
    run ./task-1.sh <<< "1"
    assert_output --partial 'odd'
}