diff --git a/internal/test_helpers/fixtures/create_blob b/internal/test_helpers/fixtures/create_blob index f0e4654..c9d65b7 100644 --- a/internal/test_helpers/fixtures/create_blob +++ b/internal/test_helpers/fixtures/create_blob @@ -1,13 +1,15 @@ Debug = true -[stage-1] Running tests for Stage #1: init -[stage-1] $ ./your_git.sh init +[stage-3] Running tests for Stage #3: create_blob +[stage-3] $ ./your_git.sh init [your_program] Initialized git directory -[stage-1] .git directory found. -[stage-1] .git/objects directory found. -[stage-1] .git/refs directory found. -[stage-1] .git/HEAD file is valid. -[stage-1] Test passed. +[stage-3] $ echo "orange pear grape pineapple blueberry banana" > pear.txt +[stage-3] $ ./your_git.sh hash-object -w pear.txt +[your_program] 7a50e289f5bde85780a843d5750ec3ae372af50a +[stage-3] Output is a 40-char SHA. +[stage-3] Blob file contents are valid. +[stage-3] Returned SHA matches expected SHA. +[stage-3] Test passed. [stage-2] Running tests for Stage #2: read_blob [stage-2] $ ./your_git.sh init @@ -18,13 +20,11 @@ Debug = true [stage-2] Output is valid. [stage-2] Test passed. -[stage-3] Running tests for Stage #3: create_blob -[stage-3] $ ./your_git.sh init +[stage-1] Running tests for Stage #1: init +[stage-1] $ ./your_git.sh init [your_program] Initialized git directory -[stage-3] $ echo "orange pear grape pineapple blueberry banana" > pear.txt -[stage-3] $ ./your_git.sh hash-object -w pear.txt -[your_program] 7a50e289f5bde85780a843d5750ec3ae372af50a -[stage-3] Output is a 40-char SHA. -[stage-3] Blob file contents are valid. -[stage-3] Returned SHA matches expected SHA. -[stage-3] Test passed. +[stage-1] .git directory found. +[stage-1] .git/objects directory found. +[stage-1] .git/refs directory found. +[stage-1] .git/HEAD file is valid. +[stage-1] Test passed. diff --git a/internal/test_helpers/fixtures/create_blob_failure b/internal/test_helpers/fixtures/create_blob_failure index b3304ad..bf9e222 100644 --- a/internal/test_helpers/fixtures/create_blob_failure +++ b/internal/test_helpers/fixtures/create_blob_failure @@ -1,23 +1,5 @@ Debug = true -[stage-1] Running tests for Stage #1: init -[stage-1] $ ./your_git.sh init -[your_program] Initialized git directory -[stage-1] .git directory found. -[stage-1] .git/objects directory found. -[stage-1] .git/refs directory found. -[stage-1] .git/HEAD file is valid. -[stage-1] Test passed. - -[stage-2] Running tests for Stage #2: read_blob -[stage-2] $ ./your_git.sh init -[your_program] Initialized git directory -[stage-2] Added blob object to .git/objects: 32eb24247f1cc0f2aa44da05b849392063a9b9e7 -[stage-2] $ ./your_git.sh cat-file -p 32eb24247f1cc0f2aa44da05b849392063a9b9e7 -[your_program] dumpty dooby doo donkey horsey vanilla -[stage-2] Output is valid. -[stage-2] Test passed. - [stage-3] Running tests for Stage #3: create_blob [stage-3] $ ./your_git.sh init [your_program] Initialized git directory diff --git a/internal/test_helpers/fixtures/create_blob_no_file b/internal/test_helpers/fixtures/create_blob_no_file index 60924aa..436ae8a 100644 --- a/internal/test_helpers/fixtures/create_blob_no_file +++ b/internal/test_helpers/fixtures/create_blob_no_file @@ -1,23 +1,5 @@ Debug = true -[stage-1] Running tests for Stage #1: init -[stage-1] $ ./your_git.sh init -[your_program] Initialized git directory -[stage-1] .git directory found. -[stage-1] .git/objects directory found. -[stage-1] .git/refs directory found. -[stage-1] .git/HEAD file is valid. -[stage-1] Test passed. - -[stage-2] Running tests for Stage #2: read_blob -[stage-2] $ ./your_git.sh init -[your_program] Initialized git directory -[stage-2] Added blob object to .git/objects: 32eb24247f1cc0f2aa44da05b849392063a9b9e7 -[stage-2] $ ./your_git.sh cat-file -p 32eb24247f1cc0f2aa44da05b849392063a9b9e7 -[your_program] dumpty dooby doo donkey horsey vanilla -[stage-2] Output is valid. -[stage-2] Test passed. - [stage-3] Running tests for Stage #3: create_blob [stage-3] $ ./your_git.sh init [your_program] Initialized git directory diff --git a/internal/test_helpers/fixtures/create_blob_no_zlib b/internal/test_helpers/fixtures/create_blob_no_zlib index 54dc68d..40acb9a 100644 --- a/internal/test_helpers/fixtures/create_blob_no_zlib +++ b/internal/test_helpers/fixtures/create_blob_no_zlib @@ -1,23 +1,5 @@ Debug = true -[stage-1] Running tests for Stage #1: init -[stage-1] $ ./your_git.sh init -[your_program] Initialized git directory -[stage-1] .git directory found. -[stage-1] .git/objects directory found. -[stage-1] .git/refs directory found. -[stage-1] .git/HEAD file is valid. -[stage-1] Test passed. - -[stage-2] Running tests for Stage #2: read_blob -[stage-2] $ ./your_git.sh init -[your_program] Initialized git directory -[stage-2] Added blob object to .git/objects: 32eb24247f1cc0f2aa44da05b849392063a9b9e7 -[stage-2] $ ./your_git.sh cat-file -p 32eb24247f1cc0f2aa44da05b849392063a9b9e7 -[your_program] dumpty dooby doo donkey horsey vanilla -[stage-2] Output is valid. -[stage-2] Test passed. - [stage-3] Running tests for Stage #3: create_blob [stage-3] $ ./your_git.sh init [your_program] Initialized git directory diff --git a/internal/test_helpers/fixtures/read_blob b/internal/test_helpers/fixtures/read_blob index f0c3042..df4766e 100644 --- a/internal/test_helpers/fixtures/read_blob +++ b/internal/test_helpers/fixtures/read_blob @@ -1,14 +1,5 @@ Debug = true -[stage-1] Running tests for Stage #1: init -[stage-1] $ ./your_git.sh init -[your_program] Initialized git directory -[stage-1] .git directory found. -[stage-1] .git/objects directory found. -[stage-1] .git/refs directory found. -[stage-1] .git/HEAD file is valid. -[stage-1] Test passed. - [stage-2] Running tests for Stage #2: read_blob [stage-2] $ ./your_git.sh init [your_program] Initialized git directory @@ -17,3 +8,12 @@ Debug = true [your_program] dumpty dooby doo donkey horsey vanilla [stage-2] Output is valid. [stage-2] Test passed. + +[stage-1] Running tests for Stage #1: init +[stage-1] $ ./your_git.sh init +[your_program] Initialized git directory +[stage-1] .git directory found. +[stage-1] .git/objects directory found. +[stage-1] .git/refs directory found. +[stage-1] .git/HEAD file is valid. +[stage-1] Test passed. diff --git a/internal/test_helpers/fixtures/read_tree b/internal/test_helpers/fixtures/read_tree index 8521128..b2cd82e 100644 --- a/internal/test_helpers/fixtures/read_tree +++ b/internal/test_helpers/fixtures/read_tree @@ -1,22 +1,14 @@ Debug = true -[stage-1] Running tests for Stage #1: init -[stage-1] $ ./your_git.sh init -[your_program] Initialized git directory -[stage-1] .git directory found. -[stage-1] .git/objects directory found. -[stage-1] .git/refs directory found. -[stage-1] .git/HEAD file is valid. -[stage-1] Test passed. - -[stage-2] Running tests for Stage #2: read_blob -[stage-2] $ ./your_git.sh init +[stage-4] Running tests for Stage #4: read_tree +[stage-4] $ ./your_git.sh init [your_program] Initialized git directory -[stage-2] Added blob object to .git/objects: 32eb24247f1cc0f2aa44da05b849392063a9b9e7 -[stage-2] $ ./your_git.sh cat-file -p 32eb24247f1cc0f2aa44da05b849392063a9b9e7 -[your_program] dumpty dooby doo donkey horsey vanilla -[stage-2] Output is valid. -[stage-2] Test passed. +[stage-4] Writing a tree to git storage.. +[stage-4] $ ./your_git.sh ls-tree --name-only 978c60262a761655b8429dbeb12f7dce351c6cd6 +[your_program] humpty +[your_program] scooby +[your_program] vanilla +[stage-4] Test passed. [stage-3] Running tests for Stage #3: create_blob [stage-3] $ ./your_git.sh init @@ -29,12 +21,20 @@ Debug = true [stage-3] Returned SHA matches expected SHA. [stage-3] Test passed. -[stage-4] Running tests for Stage #4: read_tree -[stage-4] $ ./your_git.sh init +[stage-2] Running tests for Stage #2: read_blob +[stage-2] $ ./your_git.sh init [your_program] Initialized git directory -[stage-4] Writing a tree to git storage.. -[stage-4] $ ./your_git.sh ls-tree --name-only 978c60262a761655b8429dbeb12f7dce351c6cd6 -[your_program] humpty -[your_program] scooby -[your_program] vanilla -[stage-4] Test passed. +[stage-2] Added blob object to .git/objects: 32eb24247f1cc0f2aa44da05b849392063a9b9e7 +[stage-2] $ ./your_git.sh cat-file -p 32eb24247f1cc0f2aa44da05b849392063a9b9e7 +[your_program] dumpty dooby doo donkey horsey vanilla +[stage-2] Output is valid. +[stage-2] Test passed. + +[stage-1] Running tests for Stage #1: init +[stage-1] $ ./your_git.sh init +[your_program] Initialized git directory +[stage-1] .git directory found. +[stage-1] .git/objects directory found. +[stage-1] .git/refs directory found. +[stage-1] .git/HEAD file is valid. +[stage-1] Test passed. diff --git a/internal/test_helpers/fixtures/read_tree_exit_code_failure b/internal/test_helpers/fixtures/read_tree_exit_code_failure index 0556e09..4ede304 100644 --- a/internal/test_helpers/fixtures/read_tree_exit_code_failure +++ b/internal/test_helpers/fixtures/read_tree_exit_code_failure @@ -1,34 +1,5 @@ Debug = true -[stage-1] Running tests for Stage #1: init -[stage-1] $ ./your_git.sh init -[your_program] Initialized git directory -[stage-1] .git directory found. -[stage-1] .git/objects directory found. -[stage-1] .git/refs directory found. -[stage-1] .git/HEAD file is valid. -[stage-1] Test passed. - -[stage-2] Running tests for Stage #2: read_blob -[stage-2] $ ./your_git.sh init -[your_program] Initialized git directory -[stage-2] Added blob object to .git/objects: 32eb24247f1cc0f2aa44da05b849392063a9b9e7 -[stage-2] $ ./your_git.sh cat-file -p 32eb24247f1cc0f2aa44da05b849392063a9b9e7 -[your_program] dumpty dooby doo donkey horsey vanilla -[stage-2] Output is valid. -[stage-2] Test passed. - -[stage-3] Running tests for Stage #3: create_blob -[stage-3] $ ./your_git.sh init -[your_program] Initialized git directory -[stage-3] $ echo "orange pear grape pineapple blueberry banana" > pear.txt -[stage-3] $ ./your_git.sh hash-object -w pear.txt -[your_program] 7a50e289f5bde85780a843d5750ec3ae372af50a -[stage-3] Output is a 40-char SHA. -[stage-3] Blob file contents are valid. -[stage-3] Returned SHA matches expected SHA. -[stage-3] Test passed. - [stage-4] Running tests for Stage #4: read_tree [stage-4] $ ./your_git.sh init [your_program] Initialized git directory diff --git a/internal/test_helpers/fixtures/write_tree b/internal/test_helpers/fixtures/write_tree index 455ee1a..7f404f2 100644 --- a/internal/test_helpers/fixtures/write_tree +++ b/internal/test_helpers/fixtures/write_tree @@ -1,22 +1,25 @@ Debug = true -[stage-1] Running tests for Stage #1: init -[stage-1] $ ./your_git.sh init +[stage-5] Running tests for Stage #5: write_tree +[stage-5] $ ./your_git.sh init [your_program] Initialized git directory -[stage-1] .git directory found. -[stage-1] .git/objects directory found. -[stage-1] .git/refs directory found. -[stage-1] .git/HEAD file is valid. -[stage-1] Test passed. +[stage-5] Creating some files & directories +[stage-5] $ ./your_git.sh write-tree +[your_program] 7bba7df6498a0391b69e6343b517c3360b658293 +[stage-5] Reading file at .git/objects/7b/ba7df6498a0391b69e6343b517c3360b658293 +[stage-5] Found git object file written at .git/objects/7b/ba7df6498a0391b69e6343b517c3360b658293. +[stage-5] $ git ls-tree --name-only 7bba7df6498a0391b69e6343b517c3360b658293 +[stage-5] Test passed. -[stage-2] Running tests for Stage #2: read_blob -[stage-2] $ ./your_git.sh init +[stage-4] Running tests for Stage #4: read_tree +[stage-4] $ ./your_git.sh init [your_program] Initialized git directory -[stage-2] Added blob object to .git/objects: 32eb24247f1cc0f2aa44da05b849392063a9b9e7 -[stage-2] $ ./your_git.sh cat-file -p 32eb24247f1cc0f2aa44da05b849392063a9b9e7 -[your_program] dumpty dooby doo donkey horsey vanilla -[stage-2] Output is valid. -[stage-2] Test passed. +[stage-4] Writing a tree to git storage.. +[stage-4] $ ./your_git.sh ls-tree --name-only 978c60262a761655b8429dbeb12f7dce351c6cd6 +[your_program] humpty +[your_program] scooby +[your_program] vanilla +[stage-4] Test passed. [stage-3] Running tests for Stage #3: create_blob [stage-3] $ ./your_git.sh init @@ -29,23 +32,20 @@ Debug = true [stage-3] Returned SHA matches expected SHA. [stage-3] Test passed. -[stage-4] Running tests for Stage #4: read_tree -[stage-4] $ ./your_git.sh init +[stage-2] Running tests for Stage #2: read_blob +[stage-2] $ ./your_git.sh init [your_program] Initialized git directory -[stage-4] Writing a tree to git storage.. -[stage-4] $ ./your_git.sh ls-tree --name-only 978c60262a761655b8429dbeb12f7dce351c6cd6 -[your_program] humpty -[your_program] scooby -[your_program] vanilla -[stage-4] Test passed. +[stage-2] Added blob object to .git/objects: 32eb24247f1cc0f2aa44da05b849392063a9b9e7 +[stage-2] $ ./your_git.sh cat-file -p 32eb24247f1cc0f2aa44da05b849392063a9b9e7 +[your_program] dumpty dooby doo donkey horsey vanilla +[stage-2] Output is valid. +[stage-2] Test passed. -[stage-5] Running tests for Stage #5: write_tree -[stage-5] $ ./your_git.sh init +[stage-1] Running tests for Stage #1: init +[stage-1] $ ./your_git.sh init [your_program] Initialized git directory -[stage-5] Creating some files & directories -[stage-5] $ ./your_git.sh write-tree -[your_program] 7bba7df6498a0391b69e6343b517c3360b658293 -[stage-5] Reading file at .git/objects/7b/ba7df6498a0391b69e6343b517c3360b658293 -[stage-5] Found git object file written at .git/objects/7b/ba7df6498a0391b69e6343b517c3360b658293. -[stage-5] $ git ls-tree --name-only 7bba7df6498a0391b69e6343b517c3360b658293 -[stage-5] Test passed. +[stage-1] .git directory found. +[stage-1] .git/objects directory found. +[stage-1] .git/refs directory found. +[stage-1] .git/HEAD file is valid. +[stage-1] Test passed. diff --git a/internal/test_helpers/fixtures/write_tree_err_not_exist_fail b/internal/test_helpers/fixtures/write_tree_err_not_exist_fail index c01453e..7d0d51d 100644 --- a/internal/test_helpers/fixtures/write_tree_err_not_exist_fail +++ b/internal/test_helpers/fixtures/write_tree_err_not_exist_fail @@ -1,44 +1,5 @@ Debug = true -[stage-1] Running tests for Stage #1: init -[stage-1] $ ./your_git.sh init -[your_program] Initialized git directory -[stage-1] .git directory found. -[stage-1] .git/objects directory found. -[stage-1] .git/refs directory found. -[stage-1] .git/HEAD file is valid. -[stage-1] Test passed. - -[stage-2] Running tests for Stage #2: read_blob -[stage-2] $ ./your_git.sh init -[your_program] Initialized git directory -[stage-2] Added blob object to .git/objects: 32eb24247f1cc0f2aa44da05b849392063a9b9e7 -[stage-2] $ ./your_git.sh cat-file -p 32eb24247f1cc0f2aa44da05b849392063a9b9e7 -[your_program] dumpty dooby doo donkey horsey vanilla -[stage-2] Output is valid. -[stage-2] Test passed. - -[stage-3] Running tests for Stage #3: create_blob -[stage-3] $ ./your_git.sh init -[your_program] Initialized git directory -[stage-3] $ echo "orange pear grape pineapple blueberry banana" > pear.txt -[stage-3] $ ./your_git.sh hash-object -w pear.txt -[your_program] 7a50e289f5bde85780a843d5750ec3ae372af50a -[stage-3] Output is a 40-char SHA. -[stage-3] Blob file contents are valid. -[stage-3] Returned SHA matches expected SHA. -[stage-3] Test passed. - -[stage-4] Running tests for Stage #4: read_tree -[stage-4] $ ./your_git.sh init -[your_program] Initialized git directory -[stage-4] Writing a tree to git storage.. -[stage-4] $ ./your_git.sh ls-tree --name-only 978c60262a761655b8429dbeb12f7dce351c6cd6 -[your_program] humpty -[your_program] scooby -[your_program] vanilla -[stage-4] Test passed. - [stage-5] Running tests for Stage #5: write_tree [stage-5] $ ./your_git.sh init [your_program] Initialized git directory diff --git a/internal/test_helpers/fixtures/write_tree_fail b/internal/test_helpers/fixtures/write_tree_fail index 48f1afa..748fae0 100644 --- a/internal/test_helpers/fixtures/write_tree_fail +++ b/internal/test_helpers/fixtures/write_tree_fail @@ -1,44 +1,5 @@ Debug = true -[stage-1] Running tests for Stage #1: init -[stage-1] $ ./your_git.sh init -[your_program] Initialized git directory -[stage-1] .git directory found. -[stage-1] .git/objects directory found. -[stage-1] .git/refs directory found. -[stage-1] .git/HEAD file is valid. -[stage-1] Test passed. - -[stage-2] Running tests for Stage #2: read_blob -[stage-2] $ ./your_git.sh init -[your_program] Initialized git directory -[stage-2] Added blob object to .git/objects: 32eb24247f1cc0f2aa44da05b849392063a9b9e7 -[stage-2] $ ./your_git.sh cat-file -p 32eb24247f1cc0f2aa44da05b849392063a9b9e7 -[your_program] dumpty dooby doo donkey horsey vanilla -[stage-2] Output is valid. -[stage-2] Test passed. - -[stage-3] Running tests for Stage #3: create_blob -[stage-3] $ ./your_git.sh init -[your_program] Initialized git directory -[stage-3] $ echo "orange pear grape pineapple blueberry banana" > pear.txt -[stage-3] $ ./your_git.sh hash-object -w pear.txt -[your_program] 7a50e289f5bde85780a843d5750ec3ae372af50a -[stage-3] Output is a 40-char SHA. -[stage-3] Blob file contents are valid. -[stage-3] Returned SHA matches expected SHA. -[stage-3] Test passed. - -[stage-4] Running tests for Stage #4: read_tree -[stage-4] $ ./your_git.sh init -[your_program] Initialized git directory -[stage-4] Writing a tree to git storage.. -[stage-4] $ ./your_git.sh ls-tree --name-only 978c60262a761655b8429dbeb12f7dce351c6cd6 -[your_program] humpty -[your_program] scooby -[your_program] vanilla -[stage-4] Test passed. - [stage-5] Running tests for Stage #5: write_tree [stage-5] $ ./your_git.sh init [your_program] Initialized git directory