summaryrefslogtreecommitdiffstats
path: root/test/bashisms/sleep.sh
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--test/bashisms/sleep.sh8
-rw-r--r--test/bashisms/sleep.sh.out12
2 files changed, 20 insertions, 0 deletions
diff --git a/test/bashisms/sleep.sh b/test/bashisms/sleep.sh
new file mode 100644
index 0000000..410748c
--- /dev/null
+++ b/test/bashisms/sleep.sh
@@ -0,0 +1,8 @@
+#!/bin/sh
+
+sleep 0.1 # BASHISM
+sleep 1s # BASHISM
+sleep 1d # BASHISM
+sleep -- 1 # BASHISM
+sleep 1.5s # BASHISM
+sleep 1 2 3 # BASHISM
diff --git a/test/bashisms/sleep.sh.out b/test/bashisms/sleep.sh.out
new file mode 100644
index 0000000..e619bd3
--- /dev/null
+++ b/test/bashisms/sleep.sh.out
@@ -0,0 +1,12 @@
+possible bashism in bashisms/sleep.sh line 3 (sleep only takes one integer):
+sleep 0.1 # BASHISM
+possible bashism in bashisms/sleep.sh line 4 (sleep only takes one integer):
+sleep 1s # BASHISM
+possible bashism in bashisms/sleep.sh line 5 (sleep only takes one integer):
+sleep 1d # BASHISM
+possible bashism in bashisms/sleep.sh line 6 (sleep only takes one integer):
+sleep -- 1 # BASHISM
+possible bashism in bashisms/sleep.sh line 7 (sleep only takes one integer):
+sleep 1.5s # BASHISM
+possible bashism in bashisms/sleep.sh line 8 (sleep only takes one integer):
+sleep 1 2 3 # BASHISM