about summary refs log tree commit diff
diff options
context:
space:
mode:
authorSven Wischnowsky <wischnow@users.sourceforge.net>2001-04-02 12:33:07 +0000
committerSven Wischnowsky <wischnow@users.sourceforge.net>2001-04-02 12:33:07 +0000
commit849248650aa0932dd0479d925ea570761e191de8 (patch)
treee7d062a4a3e19ebe9fecdbf90bab8e0564252664
parenta370470baeb2e7994d6165c9f056a60b2e37f21e (diff)
downloadzsh-849248650aa0932dd0479d925ea570761e191de8.tar.gz
zsh-849248650aa0932dd0479d925ea570761e191de8.tar.xz
zsh-849248650aa0932dd0479d925ea570761e191de8.zip
moved to ./Test/D01prompt.ztst
-rw-r--r--Test/10prompt.ztst106
1 files changed, 0 insertions, 106 deletions
diff --git a/Test/10prompt.ztst b/Test/10prompt.ztst
deleted file mode 100644
index 377143977..000000000
--- a/Test/10prompt.ztst
+++ /dev/null
@@ -1,106 +0,0 @@
-%prep
-
-  mydir=$PWD
-  SHLVL=2
-  setopt extendedglob
-
-%test
-
-  hash -d mydir=$mydir
-  print -P '  %%%):  %)
-  %%~:  %~
-  %%d:  %d
-  %%1/: %1/
-  %%h:  %h
-  %%L:  %L
-  %%M:  %M
-  %%m:  %m
-  %%n:  %n
-  %%N:  %N
-  %%i:  %i
-  a%%{...%%}b:  a%{%}b
-  '
-0q:Basic prompt escapes as shown.
->  %):  )
->  %~:  ~mydir
->  %d:  $mydir
->  %1/: ${mydir:t}
->  %h:  0
->  %L:  2
->  %M:  $HOST
->  %m:  ${HOST%%.*}
->  %n:  $USERNAME
->  %N:  ZTST_execchunk
->  %i:  2
->  a%{...%}b:  ab
->  
-
-  true
-  print -P '%?'
-  false
-  print -P '%?'
-0:`%?' prompt escape
->0
->1
-
-  PS4="%_> "
-  setopt xtrace
-  if true; then true; else false; fi
-  unsetopt xtrace
-0:`%_' prompt escape
-?if> true
-?then> true
-?> unsetopt xtrace
-
-  diff =(print -P '%#') =(print -P '%(!.#.%%)')
-0:`%#' prompt escape and its equivalent
-
-  psvar=(caesar adsum jam forte)
-  print -P '%v' '%4v'
-0:`%v' prompt escape
->caesar forte
-
-  true
-  print -P '%(?.true.false)'
-  false
-  print -P '%(?.true.false)'
-0:ternary prompt escapes
->true
->false
-
-  print -P '%10<...<truncated at 10%<< Not truncated'
-  print -P '%10>...>truncated at 10%>> Not truncated'
-0:prompt truncation
->...d at 10 Not truncated
->truncat... Not truncated
-
-# It's hard to check the time and date as they are moving targets.
-# We therefore just check that various forms of the date are consistent.
-# In fact, if you perform this at midnight it can still fail.
-# We could test for that, but we can't be bothered.
-# I hope LC_ALL is enough to make the format what's expected.
-
-  LC_ALL=C
-  date1=$(print -P %w)
-  date2=$(print -P %W)
-  date3=$(print -P %D)
-  if [[ $date1 != [A-Z][a-z][a-z][[:blank:]]##[0-9]## ]]; then
-    print "Date \`$date1' is not in the form \`Day DD' (e.g. \`Mon 1'"
-  fi
-  if [[ $date2 != [0-9][0-9]/[0-9][0-9]/[0-9][0-9] ]]; then
-    print "Date \`$date2' is not in the form \`DD/MM/YYYY'"
-  fi
-  if [[ $date3 != [0-9][0-9]-[0-9][0-9]-[0-9][0-9] ]]; then
-    print "Date \`$date3' is not in the form \`YY-MM-DD'"
-  fi
-  if (( $date1[5,-1] != $date2[4,5] )) || (( $date2[4,5] != $date3[7,8] ))
-  then
-    print "Days of month do not agree in $date1, $date2, $date3"
-  fi
-  if (( $date2[1,2] != $date3[4,5] )); then
-    print "Months do not agree in $date2, $date3"
-  fi
-  if (( $date2[7,8] != $date3[1,2] )); then
-    print "Years do not agree in $date2, $date3"
-  fi
-0:Dates produced by prompt escapes