Tests for module 'j1'.
[gnulib.git] / tests / test-vc-list-files-cvs.sh
index febd13b..110be03 100755 (executable)
@@ -1,6 +1,6 @@
 #!/bin/sh
 # Unit tests for vc-list-files
-# Copyright (C) 2008 Free Software Foundation, Inc.
+# Copyright (C) 2008, 2009, 2010 Free Software Foundation, Inc.
 # This file is part of the GNUlib Library.
 #
 # This program is free software: you can redistribute it and/or modify
@@ -44,7 +44,9 @@ for i in with-cvsu without; do
   ok=0
   mkdir $tmpdir && cd $tmpdir &&
     # without cvs, skip the test
-    { cvs -Q -d "$repo" init || exit 77; } &&
+    # The double use of 'exit' is needed for the reference to $? inside the trap.
+    { ( cvs -Q -d "$repo" init ) > /dev/null 2>&1 \
+      || { echo "Skipping test: cvs not found in PATH"; (exit 77); exit 77; }; } &&
     mkdir w && cd w &&
     mkdir d &&
     touch d/a b c &&