Skip to content

Commit

Permalink
test: update fixture
Browse files Browse the repository at this point in the history
  • Loading branch information
pi0 committed Jan 21, 2025
1 parent f13b802 commit 6fa56df
Show file tree
Hide file tree
Showing 5 changed files with 10 additions and 8 deletions.
18 changes: 10 additions & 8 deletions test/fixtures/gen.bash
Original file line number Diff line number Diff line change
@@ -1,12 +1,14 @@
#!/bin/bash

# set -xe

cd "$(dirname "$0")" || exit 1

create_tar() {
local format=$1
local ext=$2
local options=$3
local exclude=$4
tar $options -cf "out/${format}.tar" -C in .
if [[ $? -eq 0 ]]; then
echo "Created: out/${format}.tar"
Expand All @@ -15,18 +17,18 @@ create_tar() {
fi
}

# Cleanup

rm out/*.tar

# V7 (Original TAR format)
create_tar "v7" "tar" "--format=v7"
create_tar "v7" "tar" "--format=v7" "long"

# USTAR (POSIX 1988)
create_tar "ustar" "tar" "--format=ustar"
create_tar "ustar" "tar" "--format=ustar" "long"

# GNU TAR (Linux standard)
create_tar "gnu" "tar" "--format=gnu"
create_tar "gnu" "tar" "--format=gnu" ""

# PAX TAR (POSIX 2001)
create_tar "pax" "tar" "--format=pax"

# STAR TAR (Schily TAR - not always available, fallback to pax)
create_tar "star" "tar" "--format=star"

create_tar "pax" "tar" "--format=pax" ""
Binary file modified test/fixtures/out/gnu.tar
Binary file not shown.
Binary file modified test/fixtures/out/pax.tar
Binary file not shown.
Binary file modified test/fixtures/out/ustar.tar
Binary file not shown.
Binary file modified test/fixtures/out/v7.tar
Binary file not shown.

0 comments on commit 6fa56df

Please sign in to comment.