new free commands
This commit is contained in:
parent
451f6e6111
commit
82eafe3fe8
2
testsuite/.gitignore
vendored
2
testsuite/.gitignore
vendored
@ -1,2 +1,4 @@
|
|||||||
*.log
|
*.log
|
||||||
*.sum
|
*.sum
|
||||||
|
site.bak
|
||||||
|
site.exp
|
||||||
|
@ -2,4 +2,4 @@ AUTOMAKE_OPTIONS = dejagnu
|
|||||||
export DEJAGNU
|
export DEJAGNU
|
||||||
|
|
||||||
DEJATOOL = \
|
DEJATOOL = \
|
||||||
pwdx
|
procps-ng
|
||||||
|
@ -1,8 +1,39 @@
|
|||||||
|
|
||||||
|
regexp "(.*\/)testsuite" $objdir objdir topdir
|
||||||
|
|
||||||
proc pwdx_load { arg } { }
|
proc pwdx_load { arg } { }
|
||||||
proc pwdx_exit {} {}
|
proc pwdx_exit {} {}
|
||||||
proc pwdx_version {} {
|
proc pwdx_version {} {
|
||||||
|
global topdir
|
||||||
set tmp [ exec pwdx -V ]
|
set tmp [ exec pwdx -V ]
|
||||||
regexp "procps-ng version (\[0-9.\]*)" $tmp tmp version
|
regexp "procps-ng version (\[0-9.\]*)" $tmp tmp version
|
||||||
clone_output "pwdx version $version\n"
|
clone_output "${topdir}pwdx version $version\n"
|
||||||
|
}
|
||||||
|
|
||||||
|
# free functions
|
||||||
|
proc free_load { arg } { }
|
||||||
|
proc free_exit {} {}
|
||||||
|
proc free_version {} {
|
||||||
|
set tmp [ exec free --version ]
|
||||||
|
regexp "procps-ng version (\[0-9.\]*)" $tmp tmp version
|
||||||
|
clone_output "free version $version\n"
|
||||||
|
}
|
||||||
|
|
||||||
|
#
|
||||||
|
#
|
||||||
|
# common utilities
|
||||||
|
proc expect_continue { testname reg } {
|
||||||
|
expect {
|
||||||
|
-re "$reg" { }
|
||||||
|
eof { fail "$testname" }
|
||||||
|
timeout { fail "$testname" }
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
proc expect_pass { testname reg } {
|
||||||
|
expect {
|
||||||
|
-re "$reg" { pass "$testname" }
|
||||||
|
eof { fail "$testname" }
|
||||||
|
timeout { fail "$testname" }
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
0
testsuite/global-conf.exp
Normal file
0
testsuite/global-conf.exp
Normal file
9
testsuite/procps-ng.test/free.test/free.exp
Normal file
9
testsuite/procps-ng.test/free.test/free.exp
Normal file
@ -0,0 +1,9 @@
|
|||||||
|
#
|
||||||
|
# Testsuite for free program
|
||||||
|
#
|
||||||
|
|
||||||
|
set free "${topdir}free"
|
||||||
|
set test "free with no arguments"
|
||||||
|
spawn free
|
||||||
|
expect_pass "$test" "^\\s+total\\s+used\\s+free\\s+shared\\s+buffers\\s+cached\\s*Mem:\\s+\\d+\\s+\\d+\\s+\\d+\\s+\\d+\\s+\\d+\\s+\\d+\\s*-\\/\\+ buffers\\/cache:\\s+\\d+\\s+\\d+\\s*Swap:\\s+\\d+\\s+\\d+\\s+\\d+"
|
||||||
|
|
@ -1,4 +1,5 @@
|
|||||||
|
|
||||||
|
set pwdx "${topdir}pwdx"
|
||||||
# Run pwdx with no arguments
|
# Run pwdx with no arguments
|
||||||
set test "pwdx no args"
|
set test "pwdx no args"
|
||||||
spawn pwdx
|
spawn pwdx
|
Loading…
Reference in New Issue
Block a user