Permalink
Browse files

move some tests from testscript

  • Loading branch information...
1 parent b0da155 commit 127ac3604951051c9343caa012d5772be3829784 @tlevine committed Oct 10, 2012
View
6 test/Architect
@@ -1,7 +1,5 @@
-#!/bin/bash -i
+#!/bin/sh
-cd $tmp
-git init
-cd -
+bash -ic 'cd .tmp && git-achievements init'
./.achieved Architect
View
0 test/Archivist 100755 → 100644
File mode changed.
View
0 test/Author 100755 → 100644
File mode changed.
View
0 test/Banker 100755 → 100644
File mode changed.
View
0 test/Baptised 100755 → 100644
File mode changed.
View
0 test/Beach Lion 100755 → 100644
File mode changed.
View
12 test/Blacksmith
@@ -1,3 +1,11 @@
-#!/bin/bash -i
-exit 1
+#!/bin/sh
+bash -ic '
+cd .tmp &&
+git init &&
+echo needle > haystack &&
+git add haystack &&
+git commit haystack -m "testing Let there be light" &&
+git checkout -b foobar'
+
+./.achieved 'Blacksmith'
View
0 test/Butcher 100755 → 100644
File mode changed.
View
0 test/Caretaker 100755 → 100644
File mode changed.
View
13 test/Carpenter
@@ -1,3 +1,12 @@
-#!/bin/bash -i
-exit 1
+#!/bin/sh
+bash -ic '
+cd .tmp &&
+git init &&
+echo needle > haystack &&
+git add haystack &&
+git commit haystack -m "testing Let there be light" &&
+mv .git/hooks/pre-commit{.sample,} &&
+git status | cat'
+
+./.achieved 'Carpenter'
View
0 test/Cathedral Architect 100755 → 100644
File mode changed.
View
0 test/Cathedral Worker 100755 → 100644
File mode changed.
View
0 test/Cherry Picker 100755 → 100644
File mode changed.
View
0 test/Chimney Sweeper 100755 → 100644
File mode changed.
View
0 test/Cleaning lady 100755 → 100644
File mode changed.
View
0 test/Collector 100755 → 100644
File mode changed.
View
0 test/Delivery Boy 100755 → 100644
File mode changed.
View
0 test/Dentist 100755 → 100644
File mode changed.
View
0 test/Fisherman 100755 → 100644
File mode changed.
View
67 test/Garage Inventor 100755 → 100644
@@ -1,3 +1,66 @@
-#!/bin/bash -i
-set -e
+#!/bin/bash -x
+# setup our push repo
+mkdir .testapplication.push
+cd .testapplication.push
+git init
+cd ../
+
+mkdir .testapplication
+cd .testapplication
+
+git achievements --help
+
+git init
+
+touch README
+git add README
+git commit -s -m "First commit"
+
+git diff --cached
+echo "hello world" > README
+git add README
+git diff --cached
+git commit -s -m "Second commit"
+
+touch second_file
+git blame second_file
+
+touch .gitignore
+echo "second_file" >> .gitignore
+git add .gitignore
+git commit -s -m "third commit"
+git commit --amend -m "Third commit"
+git commit --amend -m "Third awesome commit"
+
+git remote add origin ../.testapplication.push/.git/
+git remote add local ../.testapplication.push/.git/
+git push origin
+
+git log
+git log -Sworld
+
+git checkout -b testbranch master
+git checkout -b otherbranch master
+git push origin --all
+
+git gc
+git gc
+
+git blame README
+
+
+git reflog
+
+mv .git/hooks/pre-commit.sample .git/hooks/pre-commit
+
+git format-patch HEAD^
+git reset --hard HEAD^
+git am -k3 0001*
+git config alias.xxx ls-files
+git xxx
+git config --unset alias.xxx
+
+cd ..
+rm -Rf .testapplication{,.push}
+./.achieved Garage\ Inventor
View
0 test/Gardner 100755 → 100644
File mode changed.
View
0 test/Gipsy 100755 → 100644
File mode changed.
View
0 test/Goldsmith 100755 → 100644
File mode changed.
View
12 test/Historian
@@ -1,3 +1,11 @@
-#!/bin/bash -i
-exit 1
+#!/bin/sh
+bash -ic '
+cd .tmp &&
+git init &&
+echo needle > haystack &&
+git add haystack &&
+git commit haystack -m "testing Let there be light" &&
+git log | cat'
+
+./.achieved 'Historian'
View
0 test/Homeowner 100755 → 100644
File mode changed.
View
0 test/Hunter 100755 → 100644
File mode changed.
View
0 test/Inventor ($1) 100755 → 100644
File mode changed.
View
0 test/Investigator 100755 → 100644
File mode changed.
View
15 test/Let there be light
@@ -1,10 +1,11 @@
-#!/bin/bash -i
+#!/bin/sh
-cd $tmp
-git init
-echo needle > haystack
-git add haystack
-git commit haystack -m 'testing Let there be light'
-cd -
+bash -ic '
+cd .tmp &&
+git init &&
+echo needle > haystack &&
+git add haystack &&
+git commit haystack -m "testing Let there be light"
+'
./.achieved 'Let there be light'
View
14 test/Librarian
@@ -1,2 +1,12 @@
-#!/bin/bash -i
-exit 1
+#!/bin/sh
+
+bash -ic '
+cd .tmp &&
+git init &&
+echo needle > haystack &&
+git add haystack &&
+git commit haystack -m "testing Let there be light" &&
+git log -SLet
+'
+
+./.achieved 'Librarian'
View
0 test/Locksmith 100755 → 100644
File mode changed.
View
0 test/Merchant 100755 → 100644
File mode changed.
View
0 test/Messenger 100755 → 100644
File mode changed.
View
0 test/Miller 100755 → 100644
File mode changed.
View
0 test/News Reader 100755 → 100644
File mode changed.
View
0 test/Pedantic 100755 → 100644
File mode changed.
View
0 test/Pilgrim 100755 → 100644
File mode changed.
View
0 test/Plumber 100755 → 100644
File mode changed.
View
0 test/Postman 100755 → 100644
File mode changed.
View
0 test/Presenter 100755 → 100644
File mode changed.
View
0 test/Product Manager 100755 → 100644
File mode changed.
View
16 test/Seamstress
@@ -1,11 +1,11 @@
-#!/bin/bash -i
+#!/bin/sh
-cd $tmp
-git init
-echo needle > haystack
-git add haystack
-git commit haystack -m 'testing Let there be light'
-git commit --amend -m 'testing Seamstress'
-cd -
+bash -ic '
+cd .tmp &&
+git init &&
+echo needle > haystack &&
+git add haystack &&
+git commit haystack -m "testing Let there be light" &&
+git commit --amend -m "testing Seamstress"'
./.achieved 'Seamstress'
View
0 test/Socialite 100755 → 100644
File mode changed.
View
0 test/Stamp Collector 100755 → 100644
File mode changed.
View
14 test/Stone Mason
@@ -1,10 +1,10 @@
-#!/bin/bash -i
-. ./setup
+#!/bin/sh
-cdtmp
-git init
-echo needle > haystack
-git add haystack
-cd -
+bash -ic '
+cd .tmp &&
+git init &&
+echo needle > haystack &&
+git add haystack &&
+'
./.achieved 'Stone Mason'
View
1 test/Student
@@ -1,4 +1,5 @@
#!/bin/bash -i
git status --help | cat
+
./.achieved Student
View
0 test/Thug 100755 → 100644
File mode changed.
View
0 test/Traveler 100755 → 100644
File mode changed.
View
0 test/Tree Trimmer 100755 → 100644
File mode changed.
View
12 test/Weaver
@@ -1,3 +1,11 @@
-#!/bin/bash -i
-exit 1
+#!/bin/sh
+bash -ic '
+cd .tmp &&
+git init &&
+echo needle > haystack &&
+git add haystack &&
+git commit haystack -m "testing Let there be light" &&
+git reflog | cat'
+
+./.achieved 'Weaver'
View
0 test/Web Designer 100755 → 100644
File mode changed.
View
20 test/setup
@@ -1,20 +1,4 @@
-#!/bin/bash -x
-set -e
+#!/bin/sh
rm -f ~/.git-achievements*
-export tmp=$(mktemp -d)
-export test_dir="$PWD"
-
-cd_test_dir() {
- cd "$test_dir"
-}
-
-cdtmp() {
- [ $tmp = '' ] && exit 1
- cd $tmp
-}
-
-rmtmp() {
- # Make sure it's in /tmp, then remove it
- echo $tmp | grep '/tmp/tmp.' && rm -Rf $tmp
-}
+mkdir -p ./.tmp
View
3 test/teardown
@@ -1,4 +1,3 @@
#!/bin/sh
-# Make sure it's in /tmp, then remove it
-echo $tmp | grep '/tmp/tmp.' && rm -Rf $tmp
+rm -Rf ./.tmp

0 comments on commit 127ac36

Please sign in to comment.