| 1 |
############################################################################## |
| 2 |
# Modules Revision 3.0 |
| 3 |
# Providing a flexible user environment |
| 4 |
# |
| 5 |
# File: modules.70-maint/%M% |
| 6 |
# Revision: %I% |
| 7 |
# First Edition: 2018/10/02 |
| 8 |
# Last Mod.: %U%, %G% |
| 9 |
# |
| 10 |
# Authors: Xavier Delaruelle, [email protected] |
| 11 |
# |
| 12 |
# Description: Testuite testsequence |
| 13 |
# Command: load |
| 14 |
# Modulefiles: |
| 15 |
# Sub-Command: |
| 16 |
# |
| 17 |
# Comment: %C{ |
| 18 |
# Check message block output with specific terminal width setup |
| 19 |
# }C% |
| 20 |
# |
| 21 |
############################################################################## |
| 22 |
|
| 23 |
skip_if_quick_mode |
| 24 |
|
| 25 |
set test_cols 20 |
| 26 |
if {![info exists term_cols]} { |
| 27 |
# skip tests if current terminal width is unknown |
| 28 |
send_user "\tskipping terminal width-specific tests\n" |
| 29 |
# set a specific terminal width |
| 30 |
} elseif {[catch {exec stty cols $test_cols}] || [getTtyCols] ne $test_cols} { |
| 31 |
send_user "\tskipping terminal width-specific tests, cannot set width\n" |
| 32 |
} else { |
| 33 |
|
| 34 |
# |
| 35 |
# test |
| 36 |
# |
| 37 |
|
| 38 |
setenv_path_var MODULEPATH $modpath.2 |
| 39 |
|
| 40 |
# check output when terminal size is constrained |
| 41 |
testouterr_cmd sh {load longerrword} ERR "Loading longerrword |
| 42 |
$moderr_msgs: |
| 43 |
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa |
| 44 |
while |
| 45 |
executing |
| 46 |
\"error |
| 47 |
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa\" |
| 48 |
(file |
| 49 |
\"$modpath.2/longerrword\" line 3) |
| 50 |
Please contact |
| 51 |
<root@localhost>" |
| 52 |
|
| 53 |
# |
| 54 |
# Cleanup |
| 55 |
# |
| 56 |
|
| 57 |
# restore terminal width |
| 58 |
exec stty cols $term_cols |
| 59 |
|
| 60 |
reset_test_env |
| 61 |
|
| 62 |
} |