From 475f3d5f25c7fd15c2f1de3f9d00440c522b6f8e Mon Sep 17 00:00:00 2001 From: karltk Date: Thu, 30 Sep 2004 14:21:52 +0000 Subject: [PATCH] Added unit tests for 'files' svn path=/; revision=145 --- trunk/src/equery/ChangeLog | 1 + trunk/src/equery/tests/test-files.sh | 6 ++++++ 2 files changed, 7 insertions(+) diff --git a/trunk/src/equery/ChangeLog b/trunk/src/equery/ChangeLog index 10fd9c8..b05e923 100644 --- a/trunk/src/equery/ChangeLog +++ b/trunk/src/equery/ChangeLog @@ -1,5 +1,6 @@ 2004-09-30 Karl Trygve Kalleberg * Added unit tests for --help + * Added unit tests for 'files' 2004-09-27 Karl Trygve Kalleberg * Added short commands diff --git a/trunk/src/equery/tests/test-files.sh b/trunk/src/equery/tests/test-files.sh index b0223dc..ad0a5ea 100755 --- a/trunk/src/equery/tests/test-files.sh +++ b/trunk/src/equery/tests/test-files.sh @@ -25,10 +25,16 @@ test_files() { test_files_timestamp() { equery files --timestamp bash > ${tmpfile} + + x=$(grep "/bin/bash .*....-..-.. ..:..:.." ${tmpfile} | wc -l) + assert_eq ${FUNCNAME} $x 1 } test_files_md5sum() { equery files --md5sum bash > ${tmpfile} + + x=$(egrep "/bin/bash .*[0-9a-z]{30}" ${tmpfile} | wc -l) + assert_eq ${FUNCNAME} $x 1 } test_files_type() { -- 2.26.2