aboutsummaryrefslogtreecommitdiff
path: root/tests/lib.sh
diff options
context:
space:
mode:
authorEuAndreh <eu@euandre.org>2021-01-24 03:31:07 -0300
committerEuAndreh <eu@euandre.org>2021-01-24 03:32:37 -0300
commitc5137cbba365abcf9f637e7a982b54bcb0e9fcba (patch)
tree29dd311cf7495f85defcd09533410b6a76366ebc /tests/lib.sh
parentTODOs.md: Mark task-b2c26218-5f21-4efd-afbd-ff6af57a358a as CANCELLED (diff)
downloadremembering-c5137cbba365abcf9f637e7a982b54bcb0e9fcba.tar.gz
remembering-c5137cbba365abcf9f637e7a982b54bcb0e9fcba.tar.xz
Stop depending on uuidgen
Diffstat (limited to 'tests/lib.sh')
-rwxr-xr-xtests/lib.sh8
1 files changed, 8 insertions, 0 deletions
diff --git a/tests/lib.sh b/tests/lib.sh
index efc9368..f7f4415 100755
--- a/tests/lib.sh
+++ b/tests/lib.sh
@@ -27,3 +27,11 @@ assert_stdout() {
exit 1
fi
}
+
+uuid() {
+ # Taken from:
+ # https://serverfault.com/a/799198
+ od -x /dev/urandom | \
+ head -1 | \
+ awk '{OFS="-"; print $2$3,$4,$5,$6,$7$8$9}'
+}