# Testing commands that require login:
# Desired output:
#530 Please login with USER and PASS
PWD
# Desired output:
#530 Please login with USER and PASS
PASV
# Desired output:
#530 Please login with USER and PASS
CWD
# Desired output:
#530 Please login with USER and PASS
XCWD
# Desired output:
#530 Please login with USER and PASS
CDUP
# Desired output:
#530 Please login with USER and PASS
XCUP
# Desired output:
#530 Please login with USER and PASS
SMNT
# Desired output:
#530 Please login with USER and PASS
EPRT |1|127.0.0.1|12345|
# Desired output:
#530 Please login with USER and PASS
EPSV
# Desired output:
#530 Please login with USER and PASS
ALLO
# Desired output:
#530 Please login with USER and PASS
RNFR
# Desired output:
#530 Please login with USER and PASS
RNTO
# Desired output:
#530 Please login with USER and PASS
DELE
# Desired output:
#530 Please login with USER and PASS
MDTM
# Desired output:
#530 Please login with USER and PASS
RMD
# Desired output:
#530 Please login with USER and PASS
XRMD
# Desired output:
#530 Please login with USER and PASS
MKD
# Desired output:
#530 Please login with USER and PASS
XMKD
# Desired output:
#530 Please login with USER and PASS
PWD
# Desired output:
#530 Please login with USER and PASS
XPWD
# Desired output:
#530 Please login with USER and PASS
SIZE
# Desired output:
#530 Please login with USER and PASS
CCC
# Desired output:
#533 Command channel is alredy cleared
STRU
# Desired output:
#530 Please login with USER and PASS
MODE
# Desired output:
#530 Please login with USER and PASS
RETR
# Desired output:
#530 Please login with USER and PASS
STOR
# Desired output:
#530 Please login with USER and PASS
STOU
# Desired output:
#530 Please login with USER and PASS
APPE
# Desired output:
#530 Please login with USER and PASS
REST
# Desired output:
#530 Please login with USER and PASS
ABOR
# Desired output:
#530 Please login with USER and PASS
RANG
# Desired output:
#530 Please login with USER and PASS
LIST
# Desired output:
#530 Please login with USER and PASS
NLST
# Desired output:
#530 Please login with USER and PASS
STAT
# Desired output:
#530 Please login with USER and PASS
MLSD
# Desired output:
#530 Please login with USER and PASS
MLST
# Desired output:
#530 Please login with USER and PASS
SITE

# Testing "NOOP":
# Desired output:
#200 NOOP command successful
NOOP

# Testing "SYST":
# Desired output:
#215 UNIX Type: L8
SYST

# Testing "CLNT":
# Desired output:
#200 OK
CLNT

# Testing "TYPE":
# Desired output:
#500 'TYPE' not understood
TYPE
# Desired output:
#200 Type set to i
TYPE i
# Desired output:
#200 Type set to A
type A
# Desired output:
#504 TYPE not implemented for 'e' parameter
type e
# Desired output:
#504 TYPE not implemented for 'f' parameter
type f
# Desired output:
#200 Type set to l
type l 8

# Testing "OPTS":
# Desired output:
#501 Invalid number of parameters
OPTS
# Desired output:
#200 UTF8 set to on
OPTS UTF8

#Testing non-understood commands:
# Desired output:
#500 AUTH not understood
#AUTH
# Desired output:
#500 CONF not understood
CONF
# Desired output:
#500 ENC not understood
ENC
# Desired output:
#500 MIC not understood
MIC
# Desired output:
#500 PBSZ not understood
PBSZ
# Desired output:
#500 PROT not understood
PROT

# Testing unimplemented commands:
# Desired output:
#502 ACCT command not implemented
ACCT
# Desired output:
#502 REIN command not implemented
REIN

# Testing "HOST":
# Desired output:
#500 'HOST' not understood
HOST
# Desired output:
#504 google.com: Unknown hostname provided
HOST google.com

# Testing "HELP":
# Desired output:
#214-The following commands are recognized (* =>'s unimplemented):
# CWD     XCWD    CDUP    XCUP    SMNT*   QUIT    PORT    PASV
# EPRT    EPSV    ALLO    RNFR    RNTO    DELE    MDTM    RMD
# XRMD    MKD     XMKD    PWD     XPWD    SIZE    SYST    HELP
# NOOP    FEAT    OPTS    HOST    CLNT    AUTH    CCC     CONF*
# ENC*    MIC*    PBSZ    PROT    TYPE    STRU    MODE    RETR
# STOR    STOU    APPE    REST    ABOR    RANG    USER    PASS
# ACCT*   REIN*   LIST    NLST    STAT    SITE    MLSD    MLST
#214 Direct comments to root@0.0.0.0
HELP

# Testing "FEAT":
# Desired output:
#211-Features:
# AUTH TLS
# CCC
# CLNT
# EPRT
# EPSV
# HOST
# LANG en-US*;ru-RU;es-ES;zh-CN;ko-KR;fr-FR;zh-TW;ja-JP;it-IT;bg-BG
# MDTM
# MFF modify;UNIX.group;UNIX.mode;
# MFMT
# MLST modify*;perm*;size*;type*;unique*;UNIX.group*;UNIX.groupname*;UNIX.mode*;UNIX.owner*;UNIX.ownername*;
# PBSZ
# PROT
# RANG STREAM
# REST STREAM
# SITE COPY
# SITE MKDIR
# SITE RMDIR
# SITE SYMLINK
# SITE UTIME
# SIZE
# SSCN
# TVFS
# UTF8
#211 End
FEAT

# Testing "HELP CWD":
# Desired output:
#214 Syntax: CWD <sp> pathname
HELP CWD
# Testing "HELP XCWD":
# Desired output:
#214 Syntax: XCWD <sp> pathname
HELP XCWD
# Testing "HELP CDUP":
# Desired output:
#214 Syntax: CDUP (up one directory)
HELP CDUP
# Testing "HELP XCUP":
# Desired output:
#214 Syntax: XCUP (up one directory)
HELP XCUP
# Testing "HELP SMNT":
# Desired output:
#214 Syntax: SMNT is not implemented
HELP SMNT
# Testing "HELP QUIT":
# Desired output:
#214 Syntax: QUIT (close control connection)
HELP QUIT
# Testing "HELP PORT":
# Desired output:
#214 Syntax: PORT <sp> h1,h2,h3,h4,p1,p2
HELP PORT
# Testing "HELP PASV":
# Desired output:
#214 Syntax: PASV (returns address/port)
HELP PASV
# Testing "HELP EPRT":
# Desired output:
#214 Syntax: EPRT <sp> |proto|addr|port|
HELP EPRT
# Testing "HELP EPSV":
# Desired output:
#214 Syntax: EPSV (returns port |||port|)
HELP EPSV
# Testing "HELP ALLO":
# Desired output:
#214 Syntax: ALLO is not implemented (ignored)
HELP ALLO
# Testing "HELP RNFR":
# Desired output:
#214 Syntax: RNFR <sp> pathname
HELP RNFR
# Testing "HELP RNTO":
# Desired output:
#214 Syntax: RNTO <sp> pathname
HELP RNTO
# Testing "HELP DELE":
# Desired output:
#214 Syntax: DELE <sp> pathname
HELP DELE
# Testing "HELP MDTM":
# Desired output:
#214 Syntax: MDTM <sp> pathname
HELP MDTM
# Testing "HELP RMD":
# Desired output:
#214 Syntax: RMD <sp> pathname
HELP RMD
# Testing "HELP XRMD":
# Desired output:
#214 Syntax: XRMD <sp> pathname
HELP XRMD
# Testing "HELP MKD":
# Desired output:
#214 Syntax: MKD <sp> pathname
HELP MKD
# Testing "HELP XMKD":
# Desired output:
#214 Syntax: XMKD <sp> pathname
HELP XMKD
# Testing "HELP PWD":
# Desired output:
#214 Syntax: PWD (returns current working directory)
HELP PWD
# Testing "HELP XPWD":
# Desired output:
#214 Syntax: XPWD (returns current working directory)
HELP XPWD
# Testing "HELP SIZE":
# Desired output:
#214 Syntax: SIZE <sp> pathname
HELP SIZE
# Testing "HELP SYST":
# Desired output:
#214 Syntax: SYST (returns system type)
HELP SYST
# Testing "HELP HELP":
# Desired output:
#214 Syntax: HELP [<sp> command]
HELP HELP
# Testing "HELP NOOP":
# Desired output:
#214 Syntax: NOOP (no operation)
HELP NOOP
# Testing "HELP FEAT":
# Desired output:
#214 Syntax: FEAT (returns feature list)
HELP FEAT
# Testing "HELP OPTS":
# Desired output:
#214 Syntax: OPTS <sp> command [<sp> options]
HELP OPTS
# Testing "HELP HOST":
# Desired output:
#502 Unknown command 'HOST'
HELP HOST
# Testing "HELP CLNT":
# Desired output:
#502 Unknown command 'CLNT'
HELP CLNT
# Testing "HELP AUTH":
# Desired output:
#214 Syntax: AUTH <sp> base64-data
HELP AUTH
# Testing "HELP CCC":
# Desired output:
#214 Syntax: CCC (clears protection level)
HELP CCC
# Testing "HELP CONF":
# Desired output:
#214 Syntax: CONF <sp> base64-data
HELP CONF
# Testing "HELP ENC":
# Desired output:
#214 Syntax: ENC <sp> base64-data
HELP ENC
# Testing "HELP MIC":
# Desired output:
#214 Syntax: MIC <sp> base64-data
HELP MIC
# Testing "HELP PBSZ":
# Desired output:
#214 Syntax: PBSZ <sp> protection buffer size
HELP PBSZ
# Testing "HELP PROT":
# Desired output:
#214 Syntax: PROT <sp> protection code
HELP PROT
# Testing "HELP TYPE":
# Desired output:
#214 Syntax: TYPE <sp> type-code (A, I, L 7, L 8)
HELP TYPE
# Testing "HELP STRU":
# Desired output:
#214 Syntax: STRU is not implemented (always F)
HELP STRU
# Testing "HELP MODE":
# Desired output:
#214 Syntax: MODE is not implemented (always S)
HELP MODE
# Testing "HELP RETR":
# Desired output:
#214 Syntax: RETR <sp> pathname
HELP RETR
# Testing "HELP STOR":
# Desired output:
#214 Syntax: STOR <sp> pathname
HELP STOR
# Testing "HELP STOU":
# Desired output:
#214 Syntax: STOU (store unique filename)
HELP STOU
# Testing "HELP APPE":
# Desired output:
#214 Syntax: APPE <sp> pathname
HELP APPE
# Testing "HELP REST":
# Desired output:
#214 Syntax: REST <sp> byte-count
HELP REST
# Testing "HELP ABOR":
# Desired output:
#214 Syntax: ABOR (abort current operation)
HELP ABOR
# Testing "HELP RANG":
# Desired output:
#502 Unknown command 'RANG'
HELP RANG
# Testing "HELP USER":
# Desired output:
#214 Syntax: USER <sp> username
HELP USER
# Testing "HELP PASS":
# Desired output:
#214 Syntax: PASS <sp> password
HELP PASS
# Testing "HELP ACCT":
# Desired output:
#214 Syntax: ACCT is not implemented
HELP ACCT
# Testing "HELP REIN":
# Desired output:
#214 Syntax: REIN is not implemented
HELP REIN
# Testing "HELP LIST":
# Desired output:
#214 Syntax: LIST [<sp> pathname]
HELP LIST
# Testing "HELP NLST":
# Desired output:
#214 Syntax: NLST [<sp> (pathname)]
HELP NLST
# Testing "HELP STAT":
# Desired output:
#214 Syntax: STAT [<sp> pathname]
HELP STAT
# Testing "HELP SITE":
# Desired output:
#214-HELP
# CHGRP
#214 CHMOD
HELP SITE
# Testing "HELP MLSD":
# Desired output:
#214 Syntax: MLSD [<sp> pathname]
HELP MLSD
# Testing "HELP MLST":
# Desired output:
#214 Syntax: MLST [<sp> pathname]
HELP MLST

# Testing "USER":
# Desired output:
#331 Password required for foo.
USER foo
# Desired output:
#530 Login incorrect.
PASS bar

# Testing "quit":
# Desired output:
#221 Goodbye.
quit
