mirror of
https://github.com/AdaCore/cpython.git
synced 2026-02-12 12:57:15 -08:00
Minimal test of icglue module
This commit is contained in:
27
Mac/Lib/test/icgluetest.py
Normal file
27
Mac/Lib/test/icgluetest.py
Normal file
@@ -0,0 +1,27 @@
|
||||
"""Test icglue module by printing all preferences"""
|
||||
|
||||
import icglue
|
||||
import Res
|
||||
|
||||
ici = icglue.ICStart('Pyth')
|
||||
ici.ICFindConfigFile()
|
||||
h = Res.Resource("")
|
||||
|
||||
ici.ICBegin(1)
|
||||
numprefs = ici.ICCountPref()
|
||||
print "Number of preferences:", numprefs
|
||||
|
||||
for i in range(1, numprefs+1):
|
||||
key = ici.ICGetIndPref(i)
|
||||
print "Key: ", key
|
||||
|
||||
h.data = ""
|
||||
attrs = ici.ICFindPrefHandle(key, h)
|
||||
print "Attr: ", attrs
|
||||
print "Data: ", h.data
|
||||
|
||||
ici.ICEnd()
|
||||
del ici
|
||||
|
||||
import sys
|
||||
sys.exit(1)
|
||||
Reference in New Issue
Block a user