manbytesgnu_site

Source files for manbytesgnu.org
git clone git://holbrook.no/manbytesgnu_site.git
Info | Log | Files | Refs

translate_test.sh (564B)


      1 if [ ! -z "$BAK_TEST" ]; then
      2 	src=(/foo/bar foo/bar localhost:foo/bar localhost:/foo/bar)
      3 	res=(file:///foo/bar file://foo/bar pexpect+scp://localhost/foo/bar pexpect+scp://localhost//foo/bar)
      4 
      5 	i=0
      6 	for case_src in ${src[@]}; do
      7 		case_res=${res[$i]}
      8 
      9 		to_duplicity_remote $case_src
     10 		if [ "$remote_duplicity_base" != "$case_res" ]; then
     11 			>&2 echo "expected $case_res got $remote_duplicity_base from $case_src"
     12 			exit 1
     13 		elif [ "$remote_base" != "$case_src" ]; then
     14 			>&2 echo "$case_src got mangled into $remote_base"
     15 			exit 1
     16 		fi
     17 		i=$((i+1))
     18 	done
     19 fi