Regarding an automated test for this new feature (support of $HOME/subdir and $XDG_SPECIAL_USER_DIRECTORY/subdir): I don't know how to write automated tests for Déjà-Dup, but I explained how I tested my patch in bug 1549776 comment 14. Perhaps we can use these explanations as the basis for a test.
I have tried to do so in the following file, adapted from libdeja/tests/scripts/excludes.test. This is only a draft, and it doesn't pass "make check": it looks like in tests, despite my previous patch about the test shell, $HOME is still the actual user's home directory, instead of a fake home directory in /tmp, and the XDG Special User Directories are not created in the /tmp/deja-dup-test-* directories, so it can't be tested if they are appropriately taken into account.
I'm afraid I don't have the knowledge to take it further.
Regarding an automated test for this new feature (support of $HOME/subdir and $XDG_SPECIAL_ USER_DIRECTORY/ subdir) : I don't know how to write automated tests for Déjà-Dup, but I explained how I tested my patch in bug 1549776 comment 14. Perhaps we can use these explanations as the basis for a test.
I have tried to do so in the following file, adapted from libdeja/ tests/scripts/ excludes. test. This is only a draft, and it doesn't pass "make check": it looks like in tests, despite my previous patch about the test shell, $HOME is still the actual user's home directory, instead of a fake home directory in /tmp, and the XDG Special User Directories are not created in the /tmp/deja- dup-test- * directories, so it can't be tested if they are appropriately taken into account.
I'm afraid I don't have the knowledge to take it further.
----- BEGIN FILE: libdeja/ tests/scripts/ xdg-special- user-dirs. test ----- include- list=[' $HOME/included' , '$DOWNLOAD/ included' , '$MUSIC' ];exclude- list=[' $HOME', '$HOME/ included/ excluded' , '$DOWNLOAD/ included/ excluded' , '$TRASH']; excluded $DOWNLOAD/ included/ excluded; touch $HOME/included/ in.txt $HOME/included/ excluded/ ex.txt $DOWNLOADS/ included/ in.jpg $DOWNLOAD/ included/ excluded/ ex.jpg
[Operation]
Type=backup
Settings=
Script=mkdir -p $HOME/included/
[Duplicity] dry;backup; status- restore; list;verify;
Runs=status;
[Duplicity status] '--exclude= $HOME/included/ excluded' '--include= $HOME/included' '--exclude=$HOME' '--exclude= $DOWNLOAD/ included/ excluded' '--include= $DOWNLOAD/ included' '--include=$MUSIC' '--exclude=$TRASH'
IncludeArgs=
[Duplicity dry] '--exclude= $HOME/included/ excluded' '--include= $HOME/included' '--exclude=$HOME' '--exclude= $DOWNLOAD/ included/ excluded' '--include= $DOWNLOAD/ included' '--include=$MUSIC' '--exclude=$TRASH'
IncludeArgs=
[Duplicity backup] '--exclude= $HOME/included/ excluded' '--include= $HOME/included' '--exclude=$HOME' '--exclude= $DOWNLOAD/ included/ excluded' '--include= $DOWNLOAD/ included' '--include=$MUSIC' '--exclude=$TRASH'
IncludeArgs=
----- END FILE: libdeja/ tests/scripts/ xdg-special- user-dirs. test -----