func TestVariableHanddown(t *testing.T) {
	txt := `
# handdown.suite
{
    Name: Testsuite to check variable handdown
    Variables: {
        C:  "test-c",
        D:  "{{E}}"
    }
    Main: [
        { File: "handdown.ht"
          Variables: {
              A: "call-a"
              B: "{{C}}",
          }
        }
    ]
}
# handdown.ht
{
    Name: Test of variable handdown
    Request: { URL: "file:///etc/passwd" }
    Variables: {
        Va: "{{A}}"
        Vb: "{{B}}"
    }   
}`
	globals := map[string]string{"E": "global-e"}
	rs, err := parseRawSuite("handdown.suite", txt)
	if err != nil {
		t.Fatalf("Unexpected error: %s", err)
	}
	s := rs.Execute(globals, nil, logger())
	if s.Tests[0].Variables["A"] != "call-a" ||
		s.Tests[0].Variables["B"] != "test-c" ||
		s.Tests[0].Variables["C"] != "test-c" ||
		s.Tests[0].Variables["D"] != "global-e" ||
		s.Tests[0].Variables["E"] != "global-e" ||
		s.Tests[0].Variables["Va"] != "call-a" ||
		s.Tests[0].Variables["Vb"] != "test-c" {
		s.PrintReport(os.Stdout)
		t.Errorf("Bad variable handdown. Got %v", s.Tests[0].Variables)
	}
}
Variables are handed down from scope to scope. Replacement works.
package suite
import (
	"fmt"
	"io/ioutil"
	"log"
	"math/rand"
	"os"
	"strings"
	"testing"
	"github.com/vdobler/ht/scope"
)
func logger() *log.Logger {
	if *verboseTest {
		return log.New(os.Stdout, "", 0)
	}
	return log.New(ioutil.Discard, "", 0)
}
func TestVariableDominance(t *testing.T) {
	txt := `
# dominace.suite
{
    Name: Testsuite to check variable dominance
    Variables: {
        C:  suite
        D:  suite
    }
    Main: [
        { File: "dominance.ht"
          Variables: {
              B: call
              C: call
              D: call
          }
        }
    ]
}
# dominance.ht
{
    Name: Test of variable dominance
    Request: { URL: "file:///etc/passwd" }
    Variables: {
        A: local
        B: local
        C: local
        D: local
    }   
}`
	globals := map[string]string{"D": "global"}
	rs, err := parseRawSuite("dominace.suite", txt)
	if err != nil {
		t.Fatalf("Unexpected error: %s", err)
	}
	s := rs.Execute(globals, nil, logger())
	if s.Tests[0].Variables["A"] != "local" ||
		s.Tests[0].Variables["B"] != "call" ||
		s.Tests[0].Variables["C"] != "suite" ||
		s.Tests[0].Variables["D"] != "global" {
		s.PrintReport(os.Stdout)
		t.Errorf("Bad variable dominance. Got %v", s.Tests[0].Variables)
	}
}