# -*- tcl -*-

# Requisites ...

package require log           ; # Enable full log output from the log module
log::lvSuppressLE emergency 0 ; # used by ftp (DisplayMsg)

# Package under test ...

source ftp.tcl       ; # Direct load, TE is in the tcllib/modules/ftp directory.
set ::ftp::VERBOSE 1 ; # Unthrottle debug output in the ftp module itself.
set ::ftp::DEBUG 1   ; # The ftp.tcl in question is revision 1.45

# Test async get using public ftp server and anon-login

set chan [open XOUT w]
set token [ftp::Open ftp.tcl.tk anonymous a@b]
ftp::Cd  $token pub/tcl
ftp::Get $token README.tclversions -channel $chan
close $chan

# Test async get a second time, using a much longer file

set chan [open XOUT2 w]
ftp::Cd  $token tcl8_5
ftp::Get $token tk85a6-src.zip -channel $chan
close $chan

