mirror of
https://github.com/GothenburgBitFactory/timewarrior.git
synced 2025-07-07 20:06:39 +02:00
Remove accidentially added files from repository
This commit is contained in:
parent
c416b48612
commit
9598f01fcf
39 changed files with 0 additions and 2517 deletions
|
@ -1,13 +0,0 @@
|
|||
# top-most EditorConfig file
|
||||
root = false
|
||||
|
||||
# Unix-style newlines with a newline ending every file
|
||||
[*]
|
||||
charset = utf-8
|
||||
end_of_line = lf
|
||||
insert_final_newline = true
|
||||
indent_style = space
|
||||
indent_size = 2
|
||||
|
||||
[{*.py,*.t}]
|
||||
indent_size = 4
|
Binary file not shown.
|
@ -1,16 +0,0 @@
|
|||
#ifndef INCLUDED_RULESMOCK
|
||||
#define INCLUDED_RULESMOCK
|
||||
|
||||
#include <gmock/gmock.h>
|
||||
#include <RulesProvider.h>
|
||||
|
||||
class RulesProviderMock : public RulesProvider
|
||||
{
|
||||
MOCK_CONST_METHOD1(has, bool (const std::string&));
|
||||
MOCK_CONST_METHOD1(get, std::string (const std::string&));
|
||||
MOCK_CONST_METHOD2(getInteger, int (const std::string&, int defaultValue));
|
||||
MOCK_CONST_METHOD1(getReal, double (const std::string&));
|
||||
MOCK_CONST_METHOD1(getBoolean, bool (const std::string&));
|
||||
};
|
||||
|
||||
#endif
|
Binary file not shown.
Binary file not shown.
|
@ -1,21 +0,0 @@
|
|||
////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#include <cmake.h>
|
||||
#include <timew.h>
|
||||
#include <test.h>
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
void test_granular_datetime (UnitTest& t)
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
int main (int, char**)
|
||||
{
|
||||
int planned = 1;
|
||||
UnitTest t(planned);
|
||||
|
||||
test_granular_datetime(t);
|
||||
}
|
|
@ -1,14 +0,0 @@
|
|||
{
|
||||
"description": "Hey Foo",
|
||||
"entry": "20180316T231055Z",
|
||||
"modified": "20180316T232042Z",
|
||||
"status": "pending",
|
||||
"uuid": "d07b40c4-5df7-409f-bf98-930e550333b3"
|
||||
}
|
||||
{
|
||||
"description": "Hello World",
|
||||
"entry": "20180316T231055Z",
|
||||
"modified": "20180316T232042Z",
|
||||
"status": "pending",
|
||||
"uuid": "d07b40c4-5df7-409f-bf98-930e550333b3"
|
||||
}
|
|
@ -1,15 +0,0 @@
|
|||
{
|
||||
"description": "FooBar",
|
||||
"entry": "20180316T231125Z",
|
||||
"modified": "20180316T231808Z",
|
||||
"status": "pending",
|
||||
"uuid": "e11d7d19-20a7-47bb-999e-6554a70ea094"
|
||||
}
|
||||
{
|
||||
"description": "FooBar",
|
||||
"due": "20180331T220000Z",
|
||||
"entry": "20180316T231125Z",
|
||||
"modified": "20180316T231808Z",
|
||||
"status": "pending",
|
||||
"uuid": "e11d7d19-20a7-47bb-999e-6554a70ea094"
|
||||
}
|
|
@ -1,15 +0,0 @@
|
|||
{
|
||||
"description": "FooBar",
|
||||
"entry": "20180316T231125Z",
|
||||
"modified": "20180316T231808Z",
|
||||
"status": "pending",
|
||||
"uuid": "e11d7d19-20a7-47bb-999e-6554a70ea094"
|
||||
}
|
||||
{
|
||||
"description": "FooBar",
|
||||
"due": "20180331T220000Z",
|
||||
"entry": "20180316T231125Z",
|
||||
"modified": "20180316T231808Z",
|
||||
"status": "pending",
|
||||
"uuid": "e11d7d19-20a7-47bb-999e-6554a70ea094"
|
||||
}
|
|
@ -1,85 +0,0 @@
|
|||
#!/usr/bin/env python2.7
|
||||
# -*- coding: utf-8 -*-
|
||||
###############################################################################
|
||||
#
|
||||
# Copyright 2006 - 2017, Thomas Lauf, Paul Beckingham, Federico Hernandez.
|
||||
#
|
||||
# Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
# of this software and associated documentation files (the "Software"), to deal
|
||||
# in the Software without restriction, including without limitation the rights
|
||||
# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
# copies of the Software, and to permit persons to whom the Software is
|
||||
# furnished to do so, subject to the following conditions:
|
||||
#
|
||||
# The above copyright notice and this permission notice shall be included
|
||||
# in all copies or substantial portions of the Software.
|
||||
#
|
||||
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
|
||||
# OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
|
||||
# THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||
# SOFTWARE.
|
||||
#
|
||||
# http://www.opensource.org/licenses/mit-license.php
|
||||
#
|
||||
###############################################################################
|
||||
|
||||
import os
|
||||
import subprocess
|
||||
import sys
|
||||
import unittest
|
||||
|
||||
# Ensure python finds the local simpletap module
|
||||
sys.path.append(os.path.dirname(os.path.abspath(__file__)))
|
||||
|
||||
from basetest import TestCase
|
||||
|
||||
|
||||
class TestCsv(TestCase):
|
||||
def setUp(self):
|
||||
current_dir = os.path.dirname(os.path.abspath(__file__))
|
||||
self.process = subprocess.Popen([os.path.join(current_dir, '../ext/csv.py')],
|
||||
stdin=subprocess.PIPE,
|
||||
stdout=subprocess.PIPE,
|
||||
stderr=subprocess.PIPE)
|
||||
|
||||
def test_csv_with_empty_database(self):
|
||||
"""csv extension should print nothing on empty database"""
|
||||
out, err = self.process.communicate(input="color: off\ndebug: on\ntemp.report.start: \ntemp.report.end: \n\n[]")
|
||||
|
||||
self.assertEqual('', out)
|
||||
self.assertEqual('', err)
|
||||
|
||||
def test_csv_with_filled_database(self):
|
||||
"""csv extension should print intervals for filled database"""
|
||||
out, err = self.process.communicate(
|
||||
input="color: off\ndebug: on\ntemp.report.start: 20160101T070000Z\ntemp.report.end: 20160101T080000Z\n\n[{\"start\":\"20160101T070000Z\",\"end\":\"20160101T080000Z\",\"tags\":[\"foo\"]}]")
|
||||
|
||||
self.assertEqual('"20160101T070000Z","20160101T080000Z","foo"\n', out)
|
||||
self.assertEqual('', err)
|
||||
|
||||
def test_csv_with_interval_without_tags(self):
|
||||
"""csv extension should handle interval without tags"""
|
||||
out, err = self.process.communicate(
|
||||
input="color: off\ndebug: on\ntemp.report.start: 20160101T070000Z\ntemp.report.end: 20160101T080000Z\n\n[{\"start\":\"20160101T070000Z\",\"end\":\"20160101T080000Z\"}]")
|
||||
|
||||
self.assertEqual('"20160101T070000Z","20160101T080000Z"\n', out)
|
||||
self.assertEqual('', err)
|
||||
|
||||
def test_csv_with_interval_with_empty_tag_list(self):
|
||||
"""csv extension should handle interval with empty tag list"""
|
||||
out, err = self.process.communicate(
|
||||
input="color: off\ndebug: on\ntemp.report.start: 20160101T070000Z\ntemp.report.end: 20160101T080000Z\n\n[{\"start\":\"20160101T070000Z\",\"end\":\"20160101T080000Z\"}]")
|
||||
|
||||
self.assertEqual('"20160101T070000Z","20160101T080000Z"\n', out)
|
||||
self.assertEqual('', err)
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
from simpletap import TAPTestRunner
|
||||
|
||||
unittest.main(testRunner=TAPTestRunner())
|
||||
|
||||
# vim: ai sts=4 et sw=4 ft=python
|
|
@ -1,91 +0,0 @@
|
|||
#!/usr/bin/env python2.7
|
||||
# -*- coding: utf-8 -*-
|
||||
###############################################################################
|
||||
#
|
||||
# Copyright 2006 - 2017, Thomas Lauf, Paul Beckingham, Federico Hernandez.
|
||||
#
|
||||
# Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
# of this software and associated documentation files (the "Software"), to deal
|
||||
# in the Software without restriction, including without limitation the rights
|
||||
# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
# copies of the Software, and to permit persons to whom the Software is
|
||||
# furnished to do so, subject to the following conditions:
|
||||
#
|
||||
# The above copyright notice and this permission notice shall be included
|
||||
# in all copies or substantial portions of the Software.
|
||||
#
|
||||
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
|
||||
# OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
|
||||
# THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||
# SOFTWARE.
|
||||
#
|
||||
# http://www.opensource.org/licenses/mit-license.php
|
||||
#
|
||||
###############################################################################
|
||||
|
||||
import os
|
||||
import subprocess
|
||||
import sys
|
||||
import unittest
|
||||
|
||||
# Ensure python finds the local simpletap module
|
||||
sys.path.append(os.path.dirname(os.path.abspath(__file__)))
|
||||
|
||||
from basetest import TestCase
|
||||
|
||||
|
||||
class TestDebug(TestCase):
|
||||
def setUp(self):
|
||||
current_dir = os.path.dirname(os.path.abspath(__file__))
|
||||
self.process = subprocess.Popen([os.path.join(current_dir, '../ext/debug.py')],
|
||||
stdin=subprocess.PIPE,
|
||||
stdout=subprocess.PIPE,
|
||||
stderr=subprocess.PIPE)
|
||||
|
||||
def test_debug_with_empty_database(self):
|
||||
"""debug extension should print nothing on empty database"""
|
||||
out, err = self.process.communicate(input="color: off\ndebug: on\ntemp.report.start: \ntemp.report.end: \n\n[]")
|
||||
|
||||
self.assertEqual('color: off\ndebug: on\ntemp.report.start:\ntemp.report.end:\n\n[]\n', out)
|
||||
self.assertEqual('', err)
|
||||
|
||||
def test_debug_with_filled_database(self):
|
||||
"""debug extension should print intervals for filled database"""
|
||||
out, err = self.process.communicate(
|
||||
input="color: off\ndebug: on\ntemp.report.start: 20160101T070000Z\ntemp.report.end: 20160101T080000Z\n\n[{\"start\":\"20160101T070000Z\",\"end\":\"20160101T080000Z\",\"tags\":[\"foo\"]}]")
|
||||
|
||||
self.assertEqual(
|
||||
'color: off\ndebug: on\ntemp.report.start: 20160101T070000Z\ntemp.report.end: 20160101T080000Z\n\n[{\"start\":\"20160101T070000Z\",\"end\":\"20160101T080000Z\",\"tags\":[\"foo\"]}]\n',
|
||||
out)
|
||||
self.assertEqual('', err)
|
||||
|
||||
def test_debug_with_interval_without_tags(self):
|
||||
"""debug extension should handle intervals without tags"""
|
||||
out, err = self.process.communicate(
|
||||
input="color: off\ndebug: on\ntemp.report.start: 20160101T070000Z\ntemp.report.end: 20160101T080000Z\n\n[{\"start\":\"20160101T070000Z\",\"end\":\"20160101T080000Z\"}]")
|
||||
|
||||
self.assertEqual(
|
||||
'color: off\ndebug: on\ntemp.report.start: 20160101T070000Z\ntemp.report.end: 20160101T080000Z\n\n[{\"start\":\"20160101T070000Z\",\"end\":\"20160101T080000Z\"}]\n',
|
||||
out)
|
||||
self.assertEqual('', err)
|
||||
|
||||
def test_totals_with_interval_with_empty_tag_list(self):
|
||||
"""totals extension should handle interval with empty tag list"""
|
||||
out, err = self.process.communicate(
|
||||
input="color: off\ndebug: on\ntemp.report.start: 20160101T070000Z\ntemp.report.end: 20160101T080000Z\n\n[{\"start\":\"20160101T070000Z\",\"end\":\"20160101T080000Z\",\"tags\":[]}]")
|
||||
|
||||
self.assertEqual(
|
||||
'color: off\ndebug: on\ntemp.report.start: 20160101T070000Z\ntemp.report.end: 20160101T080000Z\n\n[{\"start\":\"20160101T070000Z\",\"end\":\"20160101T080000Z\",\"tags\":[]}]\n',
|
||||
out)
|
||||
self.assertEqual('', err)
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
from simpletap import TAPTestRunner
|
||||
|
||||
unittest.main(testRunner=TAPTestRunner())
|
||||
|
||||
# vim: ai sts=4 et sw=4 ft=python
|
|
@ -1,43 +0,0 @@
|
|||
#!/bin/bash
|
||||
|
||||
# parse options/arguments
|
||||
until [ -z "${1}" ] ; do
|
||||
case "${1}" in
|
||||
--minute)
|
||||
shift
|
||||
minutes="${minutes} ${1}"
|
||||
;;
|
||||
--hour)
|
||||
shift
|
||||
hours="${hours} ${1}"
|
||||
;;
|
||||
--day)
|
||||
shift
|
||||
days="${days} ${1}"
|
||||
;;
|
||||
-*)
|
||||
echo "Unknown option '${1}'"
|
||||
exit 1
|
||||
;;
|
||||
*)
|
||||
tests="${tests} ${1}"
|
||||
;;
|
||||
esac
|
||||
shift
|
||||
done
|
||||
|
||||
for day in ${days-$(date --rfc-3339=date)} ; do
|
||||
for minute in ${minutes-$(echo "0$(rand -M 60)" | sed "s|.\+\(..\)\$|\1|g")} ; do
|
||||
for hour in ${hours-$(seq -w 0 23)} ; do
|
||||
date="${day}T${hour}:${minute}"
|
||||
for single_test in ${tests} ; do
|
||||
echo "Running test ${single_test} at ${date}"
|
||||
faketime ${date} ${single_test}
|
||||
if [ $? -ne 0 ] ; then
|
||||
echo "Test ${single_test} broke at ${date}!"
|
||||
break 2
|
||||
fi
|
||||
done
|
||||
done
|
||||
done
|
||||
done
|
Loading…
Add table
Add a link
Reference in a new issue