From 456fa287d2e2be4f802958c720a7290d162e0855 Mon Sep 17 00:00:00 2001 From: Benjamin Sago Date: Sat, 29 Apr 2017 09:21:31 +0100 Subject: [PATCH] Tests for classify and special file types --- Vagrantfile | 2 ++ xtests/run.sh | 2 ++ xtests/specials | 3 +++ xtests/specials_F | 3 +++ 4 files changed, 10 insertions(+) create mode 100644 xtests/specials create mode 100644 xtests/specials_F diff --git a/Vagrantfile b/Vagrantfile index 080467f..194cf0a 100644 --- a/Vagrantfile +++ b/Vagrantfile @@ -147,6 +147,8 @@ Vagrant.configure(2) do |config| sudo mknod "#{test_dir}/specials/block-device" b 3 60 sudo mknod "#{test_dir}/specials/char-device" c 14 40 sudo mknod "#{test_dir}/specials/named-pipe" p + + sudo touch -t #{some_date} "#{test_dir}/specials/"* EOF diff --git a/xtests/run.sh b/xtests/run.sh index ac0cba4..d7625ff 100755 --- a/xtests/run.sh +++ b/xtests/run.sh @@ -57,6 +57,8 @@ sudo -u cassowary $exa $testcases/permissions -lghR 2>&1 | diff -q - $results/pe # File types $exa $testcases/file-names-exts -1 2>&1 | diff -q - $results/file-names-exts || exit 1 +$exa $testcases/specials -l 2>&1 | diff -q - $results/specials || exit 1 +$exa $testcases/specials -F -l 2>&1 | diff -q - $results/specials_F || exit 1 # Ignores diff --git a/xtests/specials b/xtests/specials new file mode 100644 index 0000000..635f0e0 --- /dev/null +++ b/xtests/specials @@ -0,0 +1,3 @@ +brw-r--r-- 0 root  1 Jan 12:34 block-device +crw-r--r-- 0 root  1 Jan 12:34 char-device +|rw-r--r-- 0 root  1 Jan 12:34 named-pipe diff --git a/xtests/specials_F b/xtests/specials_F new file mode 100644 index 0000000..8c5d3dd --- /dev/null +++ b/xtests/specials_F @@ -0,0 +1,3 @@ +brw-r--r-- 0 root  1 Jan 12:34 block-device +crw-r--r-- 0 root  1 Jan 12:34 char-device +|rw-r--r-- 0 root  1 Jan 12:34 named-pipe|