Index: configf.scm ================================================================== --- configf.scm +++ configf.scm @@ -53,11 +53,11 @@ (define configf:include-rx (regexp "^\\[include\\s+(.*)\\]\\s*$")) (define configf:section-rx (regexp "^\\[(.*)\\]\\s*$")) (define configf:blank-l-rx (regexp "^\\s*$")) (define configf:key-sys-pr (regexp "^(\\S+)\\s+\\[system\\s+(\\S+.*)\\]\\s*$")) -(define configf:key-val-pr (regexp "^(\\S+)\\s+(.*)$")) +(define configf:key-val-pr (regexp "^(\\S+)(\\s+(.*)|())$")) (define configf:comment-rx (regexp "^\\s*#.*")) (define configf:cont-ln-rx (regexp "^(\\s+)(\\S+.*)$")) ;; read a line and process any #{ ... } constructs @@ -181,11 +181,11 @@ ((return-procs) val-proc) ((return-string) cmd) (else (val-proc))))) (loop (configf:read-line inp res) curr-section-name #f #f)) (loop (configf:read-line inp res) curr-section-name #f #f))) - (configf:key-val-pr ( x key val ) (let* ((alist (hash-table-ref/default res curr-section-name '())) + (configf:key-val-pr ( x key unk1 val unk2 ) (let* ((alist (hash-table-ref/default res curr-section-name '())) (envar (and environ-patt (string-search (regexp environ-patt) curr-section-name))) (realval (if envar (config:eval-string-in-environment val) val))) (debug:print 6 "INFO: read-config env setting, envar: " envar " realval: " realval " val: " val " key: " key " curr-section-name: " curr-section-name) Index: tests/fullrun/megatest.config ================================================================== --- tests/fullrun/megatest.config +++ tests/fullrun/megatest.config @@ -36,10 +36,12 @@ WACKYVAR4 #{scheme (+ 5 6 7)} WACKYVAR5 #{getenv sysname}/#{getenv fsname}/#{getenv datapath} WACKYVAR6 #{scheme (args:get-arg "-target")} PREDICTABLE the_ans MRAH MT_RUN_AREA_HOME=#{getenv MT_RUN_AREA_HOME} +# The empty var should have a definition with null string +EMPTY_VAR # XTERM [system xterm] # RUNDEAD [system exit 56] ## disks are: ADDED tests/fullrun/tests/test_mt_vars/empty_var.sh Index: tests/fullrun/tests/test_mt_vars/empty_var.sh ================================================================== --- /dev/null +++ tests/fullrun/tests/test_mt_vars/empty_var.sh @@ -0,0 +1,6 @@ +#!/usr/bin/env bash + +if [ x$EMPTY_VAR != "x" ];then + echo BAD EMPTY VAR! + exit 1 +fi Index: tests/fullrun/tests/test_mt_vars/testconfig ================================================================== --- tests/fullrun/tests/test_mt_vars/testconfig +++ tests/fullrun/tests/test_mt_vars/testconfig @@ -9,10 +9,13 @@ # $BOGOUS should NOT be set bogousnotset bogousnotset.sh # ALT_VAR should NOT be set altvarnotset altvarnotset.sh + +# EMPTY_VAR should be an empty string +empty_var empty_var.sh [requirements] waiton runfirst priority 0