From 778ca8e6f9f012de401fef215270670d1e028545 Mon Sep 17 00:00:00 2001 From: Jesse Duffield Date: Sun, 4 Oct 2020 21:57:58 +1100 Subject: better interface --- test/fixtures/1.sh | 17 ------------ test/fixtures/manyCommits.sh | 17 ++++++++++++ test/fixtures/newFile.sh | 15 ++++++++++ test/fixtures/updatedFile.sh | 17 ++++++++++++ test/integration/commit/snapshot.txt | 54 ++++++++++++++++++++++++++++++++---- 5 files changed, 98 insertions(+), 22 deletions(-) delete mode 100644 test/fixtures/1.sh create mode 100644 test/fixtures/manyCommits.sh create mode 100644 test/fixtures/newFile.sh create mode 100644 test/fixtures/updatedFile.sh (limited to 'test') diff --git a/test/fixtures/1.sh b/test/fixtures/1.sh deleted file mode 100644 index 2c42d6282..000000000 --- a/test/fixtures/1.sh +++ /dev/null @@ -1,17 +0,0 @@ -#!/bin/sh -git init -echo test1 > myfile1 -git add . -git commit -am "myfile1" -echo firstline > myfile2 -echo secondline >> myfile2 -echo thirdline >> myfile2 -git add . -git commit -am "myfile2" -echo firstline2 > myfile2 -echo secondline >> myfile2 -echo thirdline2 >> myfile2 -git commit -am "myfile2 update" -echo test3 > myfile3 -git add . -git commit -am "myfile3" diff --git a/test/fixtures/manyCommits.sh b/test/fixtures/manyCommits.sh new file mode 100644 index 000000000..8eec5ae57 --- /dev/null +++ b/test/fixtures/manyCommits.sh @@ -0,0 +1,17 @@ +#!/bin/sh +git init +echo test1 > myfile1 +git add . +git commit -am "myfile1" +echo test2 > myfile2 +git add . +git commit -am "myfile2" +echo test3 > myfile3 +git add . +git commit -am "myfile3" +echo test4 > myfile4 +git add . +git commit -am "myfile4" +echo test5 > myfile5 +git add . +git commit -am "myfile5" diff --git a/test/fixtures/newFile.sh b/test/fixtures/newFile.sh new file mode 100644 index 000000000..f8592c33f --- /dev/null +++ b/test/fixtures/newFile.sh @@ -0,0 +1,15 @@ +#!/bin/sh +git init +echo test1 > myfile1 +git add . +git commit -am "myfile1" +echo test2 > myfile2 +git add . +git commit -am "myfile2" +echo test3 > myfile3 +git add . +git commit -am "myfile3" +echo test4 > myfile4 +git add . +git commit -am "myfile4" +echo test5 > myfile5 diff --git a/test/fixtures/updatedFile.sh b/test/fixtures/updatedFile.sh new file mode 100644 index 000000000..2c42d6282 --- /dev/null +++ b/test/fixtures/updatedFile.sh @@ -0,0 +1,17 @@ +#!/bin/sh +git init +echo test1 > myfile1 +git add . +git commit -am "myfile1" +echo firstline > myfile2 +echo secondline >> myfile2 +echo thirdline >> myfile2 +git add . +git commit -am "myfile2" +echo firstline2 > myfile2 +echo secondline >> myfile2 +echo thirdline2 >> myfile2 +git commit -am "myfile2 update" +echo test3 > myfile3 +git add . +git commit -am "myfile3" diff --git a/test/integration/commit/snapshot.txt b/test/integration/commit/snapshot.txt index 0c50ae828..31c1e5553 100644 --- a/test/integration/commit/snapshot.txt +++ b/test/integration/commit/snapshot.txt @@ -1,13 +1,57 @@ On branch master nothing to commit, working tree clean -test +test1 +test2 +test3 +test4 +test5 my commit -diff --git a/myfile b/myfile +diff --git a/myfile5 b/myfile5 new file mode 100644 -index 0000000..9daeafb +index 0000000..4f346f1 --- /dev/null -+++ b/myfile ++++ b/myfile5 @@ -0,0 +1 @@ -+test ++test5 +myfile4 + + +diff --git a/myfile4 b/myfile4 +new file mode 100644 +index 0000000..d234c5e +--- /dev/null ++++ b/myfile4 +@@ -0,0 +1 @@ ++test4 +myfile3 + + +diff --git a/myfile3 b/myfile3 +new file mode 100644 +index 0000000..df6b0d2 +--- /dev/null ++++ b/myfile3 +@@ -0,0 +1 @@ ++test3 +myfile2 + + +diff --git a/myfile2 b/myfile2 +new file mode 100644 +index 0000000..180cf83 +--- /dev/null ++++ b/myfile2 +@@ -0,0 +1 @@ ++test2 +myfile1 + + +diff --git a/myfile1 b/myfile1 +new file mode 100644 +index 0000000..a5bce3f +--- /dev/null ++++ b/myfile1 +@@ -0,0 +1 @@ ++test1 -- cgit v1.2.3