AT_BANNER([MoleCuilder - standard options]) # 1. verbosity AT_SETUP([Standard Options - verbosity with Undo/Redo]) AT_KEYWORDS([options]) AT_CHECK([pwd],[ignore],[ignore]) AT_CHECK([../../molecuilder -v 9], 0, [stdout], [ignore]) AT_CHECK([grep "Setting verbosity from .* to 9" stdout], 0, [ignore], [ignore]) AT_CHECK([../../molecuilder -v 9 --undo], 0, [stdout], [ignore]) AT_CHECK([grep "Setting verbosity from 9 to .*" stdout], 0, [ignore], [ignore]) AT_CHECK([../../molecuilder -v 9 --undo --redo], 0, [stdout], [ignore]) AT_CHECK([grep "Setting verbosity from .* to 9" stdout], 0, [ignore], [ignore]) AT_CLEANUP # 2. help screen AT_SETUP([Standard Options - help screen]) AT_KEYWORDS([options]) AT_CHECK([../../molecuilder -h], 0, [stdout], [ignore]) AT_CHECK([fgrep "help screen" stdout], 0, [ignore], [ignore]) AT_CHECK([../../molecuilder --help], 0, [stdout], [ignore]) AT_CHECK([fgrep "help screen" stdout], 0, [ignore], [ignore]) AT_CLEANUP AT_SETUP([Standard Options - warranty screen]) AT_KEYWORDS([options]) AT_CHECK([../../molecuilder --warranty], 0, [stdout], [ignore]) AT_CHECK([fgrep "statement concerning warranty" stdout], 0, [ignore], [ignore]) AT_CHECK([fgrep "WITHOUT ANY WARRANTY" stdout], 0, [ignore], [ignore]) AT_CLEANUP # 3. no element database AT_SETUP([Standard Options - no element database]) AT_KEYWORDS([options]) AT_CHECK([../../molecuilder -e], 134, [ignore], [stderr]) AT_CLEANUP # 4. element database AT_SETUP([Standard Options - element database]) AT_KEYWORDS([options]) AT_DATA([elements.db], [[# Covalent radius of each element in Angstroem from CSD (binding is: [Rcov(A)+Rcov(B)-t,Rcov(A)+Rcov(B)+t] with t = 0.4A #Element Name Symbol Period Group Block Atomic Number AtomicWeight Covalent Radius vdW Radius Hydrogen H 1 1 s 1 1.008 0.23 1.09 Helium He 1 18 p 2 4.003 1.5 1.4 ]]) AT_CHECK([../../molecuilder -i test.conf -e ./], 0, [stdout], [stderr]) AT_CHECK([grep -E "Using.*as elements database." stdout], 0, [ignore], [ignore]) AT_CHECK([fgrep "Element list loaded successfully." stdout], 0, [ignore], [ignore]) AT_CHECK([fgrep "Something went wrong while parsing the other databases!" stderr], 0, [ignore], [ignore]) AT_CLEANUP # 5. bond length database AT_SETUP([Standard Options - bond length table]) AT_KEYWORDS([options]) AT_DATA([bondlength.db], [[# bond length database 1 2 1 1. 0. 2 0. 0. ]]) AT_CHECK([../../molecuilder -i test.conf -g bondlength.db], 0, [stdout], [stderr]) AT_CHECK([grep -E "Using.*as bond length table." stdout], 0, [ignore], [ignore]) AT_CLEANUP # 6. fast trajectories AT_SETUP([Standard Options - fast trajectories]) AT_KEYWORDS([options]) AT_CHECK([../../molecuilder -i test.conf -n 1], 0, [stdout], [stderr]) AT_CHECK([fgrep "I won't parse trajectories" stdout], 0, [ignore], [ignore]) AT_CLEANUP AT_SETUP([Standard Options - fast trajectories with Undo/Redo]) AT_KEYWORDS([options]) AT_CHECK([../../molecuilder -i test.conf -n 1 --undo], 0, [stdout], [stderr]) AT_CHECK([fgrep "I will parse trajectories." stdout], 0, [ignore], [ignore]) AT_CHECK([../../molecuilder -i test.conf -n 1 --undo --redo], 0, [stdout], [stderr]) AT_CHECK([grep -c "I won't parse trajectories" stdout], 0, 2 , [ignore]) AT_CLEANUP # 7. molecule default name AT_SETUP([Standard Options - molecule default name]) AT_KEYWORDS([options]) AT_CHECK([../../molecuilder -i test.conf -X test], 0, [stdout], [stderr]) AT_CHECK([fgrep "Default name of new molecules set to test." stdout], 0, [ignore], [ignore]) AT_CLEANUP AT_SETUP([Standard Options - molecule default name with Undo/Redo]) AT_KEYWORDS([options]) AT_CHECK([../../molecuilder -i test.conf -X test --undo], 0, [stdout], [stderr]) AT_CHECK([fgrep "Default name of new molecules set to none." stdout], 0, [ignore], [ignore]) AT_CHECK([../../molecuilder -i test.conf -X test --undo --redo], 0, [stdout], [stderr]) AT_CHECK([fgrep "Default name of new molecules set to test." stdout], 0, [ignore], [ignore]) AT_CLEANUP