-
Notifications
You must be signed in to change notification settings - Fork 37
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
test: Add primary testing and usage message
Signed-off-by: Thomas Venriès <thomas.venries@gmail.com>
- Loading branch information
Thomas Venriès
committed
Nov 5, 2017
1 parent
8dc0f24
commit 6fb558e
Showing
3 changed files
with
45 additions
and
19 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,18 +1,36 @@ | ||
#!/bin/sh | ||
|
||
echo 'TEST: Common Modes' | ||
echo '#=========================#' | ||
./mons | ||
echo '#=========================#' | ||
if [ "$#" -ne 2 ]; then | ||
echo 'Usage: test-common.sh CURR_MON_NAME MON_NAME' | ||
echo | ||
echo 'Monitor names are required. Names are given by "mons". | ||
CURR_MON_NAME is your current monitor and the second one is reserved | ||
for primary test.' | ||
exit 1 | ||
fi | ||
|
||
./mons -o ; echo "test: primary" ; sleep 8 | ||
./mons -s ; echo "test: second" ; sleep 8 | ||
./mons -e left ; echo "test: extend left" ; sleep 8 | ||
./mons -d ; echo "test: duplicate" ; sleep 8 | ||
./mons -m ; echo "test: mirror" ; sleep 8 | ||
./mons -e right ; echo "test: extend right" ; sleep 8 | ||
./mons -e top ; echo "test: extend top" ; sleep 8 | ||
./mons -e bottom ; echo "test: extend bottom" ; sleep 8 | ||
./mons -o ; echo "test: primary" ; sleep 8 | ||
./mons -s ; echo "test: second" ; sleep 8 | ||
./mons -o ; echo "test: primary" | ||
Test_Common () { | ||
echo 'TEST: Common Modes' | ||
echo '#=========================#' | ||
./mons | ||
echo '#=========================#' | ||
|
||
./mons -o ; echo "test: primary" ; sleep 8 | ||
./mons -s ; echo "test: second" ; sleep 8 | ||
./mons -e left ; echo "test: extend left" ; sleep 8 | ||
./mons -d ; echo "test: duplicate" ; sleep 8 | ||
./mons -m ; echo "test: mirror" ; sleep 8 | ||
./mons -e right ; echo "test: extend right" ; sleep 8 | ||
./mons -e top ; echo "test: extend top" ; sleep 8 | ||
./mons -e bottom ; echo "test: extend bottom" ; sleep 8 | ||
./mons -o ; echo "test: primary" ; sleep 8 | ||
./mons -s ; echo "test: second" ; sleep 8 | ||
./mons -o ; echo "test: primary" | ||
} | ||
|
||
./mons -o --primary "$1" | ||
Test_Common | ||
./mons -o --primary "$2" | ||
echo "[ Primary has been set: $1 ]" | ||
Test_Common | ||
./mons -o --primary "$1" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters