Skip to content

Commit 11301c0

Browse files
committed
WIP: attempt to write a blurb of git-style test
The tests won't work outside of the git tree. Perhaps, I should just rewrite it to plain shell script. Should I?
1 parent 1951e39 commit 11301c0

File tree

2 files changed

+27
-1
lines changed

2 files changed

+27
-1
lines changed

.github/workflows/shellcheck.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,4 +15,4 @@ jobs:
1515
- name: Run ShellCheck
1616
uses: ludeeus/action-shellcheck@master
1717
with:
18-
ignore_paths: ./completion.*
18+
ignore_paths: ./completion.* ./t/*

t/t7600-fixup.sh

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
#!/bin/sh
2+
3+
test_description='.'
4+
5+
export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME
6+
7+
TEST_PASSES_SANITIZE_LEAK=true
8+
. ./test-lib.sh
9+
10+
test_expect_success 'setup' '
11+
git init almost-complete
12+
cd almost-complete/
13+
14+
echo "Testing file 1" >test_01.txt
15+
git add test_01.txt
16+
git commit -m "Commiting the first file."
17+
echo "Testing file 2" >test_02.txt
18+
git add test_02.txt
19+
git commit -m "Commiting the second file."
20+
echo "Modifying the first file." >>test_01.txt
21+
git add test_01.txt
22+
# git fixup --no-commit |grep -s "something"
23+
/bin/true
24+
'
25+
26+
test_done

0 commit comments

Comments
 (0)