data: added manual tests for python sourcegroup

This commit is contained in:
mlangkabel
2019-04-23 16:53:32 +02:00
parent 42cd0f05d7
commit 9e9d488834
8 changed files with 100 additions and 0 deletions
@@ -0,0 +1,19 @@
#!/bin/bash
# get absolute path to parent directory of script
MY_PATH=`dirname "$0"`
if [[ "${MY_PATH}" != *\\* ]]
then
cd $MY_PATH
MY_PATH=`pwd`
fi
MY_PATH="${MY_PATH//\\//}"
SRC_PATH=$MY_PATH/data
WORKING_COPY_PATH=$MY_PATH/working_copy
mkdir -p $WORKING_COPY_PATH
cp -a $SRC_PATH/. $WORKING_COPY_PATH
echo "Setup Complete"
@@ -0,0 +1,17 @@
#!/bin/bash
# get absolute path to parent directory of script
MY_PATH=`dirname "$0"`
if [[ "${MY_PATH}" != *\\* ]]
then
cd $MY_PATH
MY_PATH=`pwd`
fi
MY_PATH="${MY_PATH//\\//}"
WORKING_COPY_PATH=$MY_PATH/working_copy
echo "" >> $WORKING_COPY_PATH/src/bar.py
echo "Update Complete"
@@ -0,0 +1,16 @@
#!/bin/bash
# get absolute path to parent directory of script
MY_PATH=`dirname "$0"`
if [[ "${MY_PATH}" != *\\* ]]
then
cd $MY_PATH
MY_PATH=`pwd`
fi
MY_PATH="${MY_PATH//\\//}"
WORKING_COPY_PATH=$MY_PATH/working_copy
rm -rf $WORKING_COPY_PATH
echo "Teardown Complete"
@@ -0,0 +1,32 @@
* Run "1_setup.sh"
* Start up Sourcetrail
* Click "New Project"
* Enter a project name
* Set "./working_copy" as project location
* Click "Add Source Group"
* Select "Python" -> Empty Python Source Group"
* Click "Next"
* Add "./src" to "Files & Directories to Index"
* Add "**/foo.py" to "Excluded Files & Directories"
* Click "Next"
* Click "Create"
* Validate "All files" is the only option selectable
* Click "Start"
* Validate Project indexed without error
* Click "OK"
* Press "Refresh" button
* Validate "Updated files" is selected
* Validate "source files to index" shows "0"
* Click "Cancel"
* Run "2_update.sh"
* Press "Refresh" button
* Validate "Files to clear" shows "1"
* Validate "source files to index" shows "1"
* Click "Start"
* Validate dialog shows up that informs that only full re-indexing is possible
* Click "Full Re-Index"
* Validate Project indexed without error
* Click "OK"
* Close Sourcetrail
* Run "3_teardown.sh"
@@ -0,0 +1,4 @@
import baz
class Bar(baz.Baz):
pass
@@ -0,0 +1,2 @@
class Baz:
pass
@@ -0,0 +1,4 @@
import baz
class Foo(baz.Baz):
pass
@@ -0,0 +1,6 @@
import foo
import bar
def test():
foo = foo.Foo()
bar = bar.Bar()