exa/devtools/dev-fixtures.sh
Benjamin Sago 91f1541e85 Make the Vagrant environment creation nicer
Now, instead of reams of unreadable command output, we get a nice set of stages:

[ 0/13] Deleting existing test cases directory
[ 1/13] Creating file size testcases
[ 2/13] Creating file name extension testcases
[ 3/13] Creating file names testcases
[ 4/13] Creating special file kind testcases
[ 5/13] Creating symlink testcases
[ 6/13] Creating user and group testcases
[ 7/13] Creating file permission testcases
[ 8/13] Creating date and time testcases
[ 9/13] Creating extended attribute testcases
[10/13] Creating Git testcases (1/3)
[11/13] Creating Git testcases (2/3)
[12/13] Creating Git testcases (3/3)
[13/13] Creating hidden and dot file testcases

The scripts have been moved out of the Vagrantfile because it was getting long and they're more readable this way.
2020-10-16 23:41:25 +01:00

40 lines
1.4 KiB
Bash
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

#!/bin/bash
# This file contains the text fixtures — the known, constant data — that are
# used when setting up the environment that exas tests get run in.
# The directory that all the test files are created under.
export TEST_ROOT=/testcases
# Because the timestamps are formatted differently depending on whether
# theyre in the current year or not (see `details.rs`), we have to make
# sure that the files are created in the current year, so they get shown
# in the format we expect.
export CURRENT_YEAR=$(date "+%Y")
export FIXED_DATE="${CURRENT_YEAR}01011234.56" # 1st January, 12:34:56
# We also need an UID and a GID that are guaranteed to not exist, to
# test what happen when they dont.
export FIXED_BAD_UID=666
export FIXED_BAD_GID=616
# We create two users that own the test files.
#
# The first one just owns the ordinary ones, because we dont want the
# test outputs to depend on “vagrant” or “ubuntu” existing.
#
# The second one has a long name, to test that the file owner column
# widens correctly. The benefit of Vagrant is that we dont need to
# set this up on the *actual* system!
export FIXED_USER="cassowary"
export FIXED_LONG_USER="antidisestablishmentarienism"
# A couple of dates, for date-time testing.
export OLD_DATE='200303030000.00'
export MED_DATE='200606152314.29' # the june gets used for fr_FR locale tests
export NEW_DATE='200912221038.53' # and the december for ja_JP local tests