<commit_before><commit_msg>Added comment about how this test will not work reliably<commit_after>#!/bin/sh

# I cannot get this test to work reliably!
# I suspect the culprit is FAM.
#   -- Mark

source __lib.sh

TESTFILE="/tmp/testkarm.ics"

set_up

TODO_NAME=$0
TODO_UID=abc-123
TODO_TIME=`date +%Y%m%dT%H%M%SZ`

cat >> $TESTFILE << endl
BEGIN:VCALENDAR
PRODID:-//K Desktop Environment//NONSGML KArm Test Scripts//EN
VERSION:2.0

BEGIN:VTODO
DTSTAMP:$TODO_TIME
ORGANIZER;CN=Anonymous:MAILTO:nobody@nowhere
CREATED:$TODO_TIME
UID:$TODO_UID
SEQUENCE:0
LAST-MODIFIED:$TODO_TIME
SUMMARY:$TODO_NAME
CLASS:PUBLIC
PRIORITY:5
PERCENT-COMPLETE:0
END:VTODO

END:VCALENDAR
endl

# wait so FAM and KDirWatcher tell karm and karm refreshes view
sleep 2

RVAL=`dcop $DCOPID KarmDCOPIface hastodo $TODO_NAME`
#echo "RVAL = $RVAL"

tear_down

# check that todo was found
if [ "$RVAL" == "$TODO_UID" ]; then 
  echo "PASS $0"
  exit 0;
else 
  echo "FAIL $0: got /$RVAL/, expected /$TODO_UID/"
  exit 1;
fi
{'fraction_non_alphanumeric': 0.11806256306760847, 'fraction_numerical': 0.014127144298688193, 'mean_word_length': 5.012121212121212, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 5, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4724468', 'n_tokens_mistral': 432, 'n_tokens_neox': 405, 'n_words': 106}