// Test app location dispatch

import assert;
import files;
import io;
import string;
import sys;

app (file o) hostname() {
  "hostname" @stdout=o;
}

(string o) extract_hostname(file f) {
  o = trim(readFile(f));
}

main {
  foreach i in [1:100] {
    string host1 = extract_hostname(hostname());
    // Run on same host
    string host2 = extract_hostname(@location=hostmap_one(host1) hostname());
    assertEqual(host1, host2, sprintf("Check hostnames same trial %i", i));
  }
}

Add test for @location and app functions
Add test for @location and app functions

git-svn-id: 47705994653588c662f4ea400dfe88107361c0e2@7289 dc4e9af1-7f46-4ead-bba6-71afc04862de
