* Benjamin Drung <[email protected]> [2013-11-02 00:05]:

I have just one recommendation/wish: It would be nice if test cases could be added for the new feature. The test cases should work offline.

Would something along the lines of the very simple-minded shell script attached below be appropriate? Of course, it will need adaptation for the shunit2 framework used in devscripts.

What this script does is (1) create a minimal Debian package directory, containing minimal files debian/{changelog,watch,copyright}, (2) create a minimal repository, containing a tarball (built on the fly), and (3) start an HTTP server that works offline, using the SimpleHTTPServer module of Python.

When I run this with the modified uscan.pl, I obtain the following:

   foo/
   foo/exclude-this
   foo/include-this
   Serving HTTP on 0.0.0.0 port 8000 ...
   -- Scanning for watchfiles in .
   -- Found watchfile in ./debian
   -- In debian/watch, processing watchfile line:
      http://localhost:8000/foo-(\d).tar.gz
   127.0.0.1 - - [02/Nov/2013 08:27:16] "GET / HTTP/1.1" 200 -
   -- Found the following matching hrefs:
        foo-1.tar.gz (1)
   Newest version on remote site is 1, local version is 0
    => Newer version available from
       http://localhost:8000/foo-1.tar.gz
   -- Downloading updated package foo-1.tar.gz
   127.0.0.1 - - [02/Nov/2013 08:27:16] "GET /foo-1.tar.gz HTTP/1.1" 200 -
   -- Successfully downloaded updated package foo-1.tar.gz
       and removed files from it in foo_1+dfsg.orig.tar.gz
   -- Scan finished
   drwxr-xr-x root/root         0 2013-11-02 08:27 foo-1+dfsg.orig/
   -rw-r--r-- root/root         0 2013-11-02 08:27 foo-1+dfsg.orig/include-this

Best,

Rafael

Attachment: test-uscan-files-excluded.sh
Description: Bourne shell script

_______________________________________________
devscripts-devel mailing list
[email protected]
http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/devscripts-devel

Reply via email to