| 
            Last change
 on this file since 726 was             206, checked in by Herwig Bauernfeind, 16 years ago           | 
        
        
          | 
             
Import Samba 3.3 branch at 3.0.0 level (psmedley's port) 
 
           | 
        
        
          | 
            File size:
            705 bytes
           | 
        
      
      
| Line |   | 
|---|
| 1 | #
 | 
|---|
| 2 | # Test operations on IPC$ share
 | 
|---|
| 3 | #
 | 
|---|
| 4 | 
 | 
|---|
| 5 | # Initialisation
 | 
|---|
| 6 | 
 | 
|---|
| 7 | load_lib env-single.exp
 | 
|---|
| 8 | load_lib smbclient.exp
 | 
|---|
| 9 | 
 | 
|---|
| 10 | set timeout 10
 | 
|---|
| 11 | 
 | 
|---|
| 12 | # Spawn a smbclient
 | 
|---|
| 13 | 
 | 
|---|
| 14 | if {![spawn_smbclient //$server/ipc\$ -U $user]} {
 | 
|---|
| 15 |     perror "error spawning smbclient"
 | 
|---|
| 16 |     return -1
 | 
|---|
| 17 | }
 | 
|---|
| 18 | 
 | 
|---|
| 19 | #
 | 
|---|
| 20 | # Start performing tests
 | 
|---|
| 21 | #
 | 
|---|
| 22 | 
 | 
|---|
| 23 | global smb_prompt
 | 
|---|
| 24 | 
 | 
|---|
| 25 | do_smbclient "lcd /tmp\r" "lcd /tmp"
 | 
|---|
| 26 | do_smbclient "!touch test.out\r" "touch test.out"
 | 
|---|
| 27 | 
 | 
|---|
| 28 | foreach { op } { "dir\r" "put test.out\r" "get test.out\r" \
 | 
|---|
| 29 |         "get /etc/passwd\r" "mkdir foo\r" "print test.out\r" } {
 | 
|---|
| 30 | 
 | 
|---|
| 31 |     set action "doing $op"
 | 
|---|
| 32 |     set output [do_smbclient $op $action]
 | 
|---|
| 33 | 
 | 
|---|
| 34 |     if {![regexp "ERR" $output]} {
 | 
|---|
| 35 |         fail $action
 | 
|---|
| 36 |         puts $output
 | 
|---|
| 37 |     } else {
 | 
|---|
| 38 |         pass $action
 | 
|---|
| 39 |     }
 | 
|---|
| 40 | }
 | 
|---|
| 41 | 
 | 
|---|
| 42 | # Clean up
 | 
|---|
| 43 | 
 | 
|---|
| 44 | file delete test.out
 | 
|---|
       
      
  Note:
 See   
TracBrowser
 for help on using the repository browser.