/* Copyright (C) 1993, Digital Equipment Corporation        */
/* All rights reserved.                                     */
/* See the file COPYRIGHT for a full description.           */

/* Last modified on Thu Apr 14 15:50:57 PDT 1994 by mcjones */

if defined("getwd")
write(CR, "--- tests in ", getwd(), "---", CR)
end

import("libm3")

build_standalone()

module("PathnameTests")
interface("Subr")
module("TextSubrTbl")
implementation("OSTest")
program("OSTest")

include( ".." & SL & ".." & SL & "src" & SL & "defs.quake" )

src = ".." & SL & "src"

testids = [
  "pathname-tests",
  "process-tests",
  "filesystem-tests"
]

if defined("RUN")

  foreach tid in testids
    write( "performing " & tid & "...", CR )
    write( getwd(), CR )
    pin = src & SL & tid & "-input"
    pexp = src & SL & tid & "-output"
    pout = "." & SL & tid & "-output"
    r = q_exec( "." & SL & "OSTest < " & pin & " 2> " & pout )
    ok = cmp_files( tid, pout, pexp )
  end

end
