Rev 3 | Go to most recent revision | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 3 | Rev 4 | ||
---|---|---|---|
Line 15... | Line 15... | ||
15 | 15 | ||
16 | # TODO: anzeigen von wann der whois output ist... "last checked" -> "last activity" (da ein user-mode-batch-approval ja kein recheck beinhaltet) |
16 | # TODO: anzeigen von wann der whois output ist... "last checked" -> "last activity" (da ein user-mode-batch-approval ja kein recheck beinhaltet) |
17 | 17 | ||
18 | DIR=$( dirname "$0" ) |
18 | DIR=$( dirname "$0" ) |
19 | 19 | ||
20 | annotfile="$DIR/../../config/testcases.annot" |
20 | ANNOTATION_FILE="$DIR/../../config/testcases.annot" |
21 | - | ||
22 | TESTCASE_CACHE_FILE="$DIR/../../.cache/testcases" |
21 | TESTCASE_CACHE_FILE="$DIR/../../.cache/testcases" |
23 | 22 | ||
24 | # --- |
23 | # --- |
25 | 24 | ||
26 | function resetconsole { |
25 | function resetconsole { |
Line 55... | Line 54... | ||
55 | # But then it still can't handle colors... |
54 | # But then it still can't handle colors... |
56 | echo "$out" | "$DIR"/highlighter "${A[@]}" |
55 | echo "$out" | "$DIR"/highlighter "${A[@]}" |
57 | } |
56 | } |
58 | 57 | ||
59 | function question { |
58 | function question { |
60 | if [ -f "$annotfile" ]; then |
59 | if [ -f "$ANNOTATION_FILE" ]; then |
61 | ANNOTS=$( cat "$annotfile" | grep -E "^$query:" ) |
60 | ANNOTS=$( cat "$ANNOTATION_FILE" | grep -E "^$query:" ) |
62 | if [ "$ANNOTS" != "" ]; then |
61 | if [ "$ANNOTS" != "" ]; then |
63 | echo "" |
62 | echo "" |
64 | echo "********************" |
63 | echo "********************" |
65 | echo "Notes in $annotfile :" |
64 | echo "Notes in $ANNOTATION_FILE :" |
66 | OLDIFS="$IFS" |
65 | OLDIFS="$IFS" |
67 | IFS=$'\n' |
66 | IFS=$'\n' |
68 | for p in ${ANNOTS[@]}; do |
67 | for p in ${ANNOTS[@]}; do |
69 | pos="${#query}" |
68 | pos="${#query}" |
70 | (( pos += 2 )) |
69 | (( pos += 2 )) |
Line 130... | Line 129... | ||
130 | 129 | ||
131 | if [ "$note" == "" ]; then |
130 | if [ "$note" == "" ]; then |
132 | echo "Cancelled" |
131 | echo "Cancelled" |
133 | else |
132 | else |
134 | echo "Note added to testcase of $query" |
133 | echo "Note added to testcase of $query" |
135 | echo "$query: $note" >> "$annotfile" |
134 | echo "$query: $note" >> "$ANNOTATION_FILE" |
136 | fi |
135 | fi |
137 | ;; |
136 | ;; |
138 | [Xx]* ) |
137 | [Xx]* ) |
139 | return 2 |
138 | return 2 |
140 | ;; |
139 | ;; |