Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CircleCI - Continuous Integration #36

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions circle.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
machine:
python:
version: 2.7.11

test:
override:
- bash tests/test.sh
14 changes: 6 additions & 8 deletions tests/test.sh
Original file line number Diff line number Diff line change
@@ -1,17 +1,15 @@
#!/bin/bash

trap "exit 130" INT
cleanup() { rm -f test.ini good.ini example.ini; exit; }
cleanup() { rm -f test.ini good.ini tests/example.ini; exit; }
trap cleanup EXIT

export PATH=..:$PATH

test=0

Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If the current or parent dir isn't in the $PATH, we're not sure the correct crudini will be executed

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Okey, I will fixit, and try to use it with Tox.

fail() { test=$(($test+1)); echo "Test $test FAIL (line ${BASH_LINENO[0]})"; exit 1; }
ok() { test=$(($test+1)); echo "Test $test OK (line ${BASH_LINENO[0]})"; }

cp ../example.ini .
cp example.ini tests/example.ini

# invalid params ----------------------------------------

Expand Down Expand Up @@ -204,11 +202,11 @@ ok

# get section1 in ini format
crudini --format=ini --get example.ini section1 > test.ini
diff -u test.ini section1.ini && ok || fail
diff -u test.ini tests/section1.ini && ok || fail

# get section1 in sh format
crudini --format=sh --get example.ini section1 > test.ini
diff -u test.ini section1.sh && ok || fail
diff -u test.ini tests/section1.sh && ok || fail

# empty DEFAULT is not printed
printf '%s\n' '[DEFAULT]' '#comment' '[section1]' > test.ini
Expand Down Expand Up @@ -400,10 +398,10 @@ test -f missing.ini && fail || ok
# --get-lines --------------------------------------------

crudini --get --format=lines example.ini section1 > test.ini || fail
diff -u test.ini section1.lines && ok || fail
diff -u test.ini tests/section1.lines && ok || fail

crudini --get --format=lines example.ini > test.ini || fail
diff -u test.ini example.lines && ok || fail
diff -u test.ini tests/example.lines && ok || fail

# --list -------------------------------------------------

Expand Down