summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorEmanuele Rocca <ema@debian.org>2008-10-04 22:13:00 +0200
committerEmanuele Rocca <ema@debian.org>2008-10-04 22:13:00 +0200
commit5363fda9e7ebdc4dd191183ece2e6e070d68d716 (patch)
tree9c9b78bcbb5deb942bec2114e3ae5ea052f82ff1 /tests
parent825ead499fa2f385c2cb0876316424b0595c0d3c (diff)
downloadpython-apt-5363fda9e7ebdc4dd191183ece2e6e070d68d716.tar.gz
Add tests/getcache_mem_corruption.py
Diffstat (limited to 'tests')
-rw-r--r--tests/getcache_mem_corruption.py11
1 files changed, 11 insertions, 0 deletions
diff --git a/tests/getcache_mem_corruption.py b/tests/getcache_mem_corruption.py
new file mode 100644
index 00000000..e127f66e
--- /dev/null
+++ b/tests/getcache_mem_corruption.py
@@ -0,0 +1,11 @@
+#!/usr/bin/python
+import apt_pkg
+import re
+
+apt_pkg.InitConfig()
+apt_pkg.InitSystem()
+apt_cache = apt_pkg.GetCache()
+# wrong
+apt_depcache = apt_pkg.GetCache(apt_cache)
+# correct: apt_depcache = apt_pkg.GetDepCache(apt_cache)
+re.compile('a')