Doctests for the fix_texturepath spell
======================================


>>> import os
>>> from os.path import dirname
>>> dirpath = __file__
>>> for i in range(4): #recurse up to root repo dir
...     dirpath = dirname(dirpath)
>>> repo_root = dirpath
>>> script_dir = os.path.join(repo_root, "scripts", "nif")
>>> import sys
>>> script = os.path.join(script_dir, "niftoaster.py")
>>> sys.path.insert(-1, script_dir.replace("\\\\", "/"))
>>> nif_dir = "tests/spells/nif/files/"

>>> import niftoaster
>>> sys.argv = ["niftoaster.py", "fix_texturepath", "--dry-run", "--noninteractive", nif_dir + "test_fix_texturepath.nif"]
>>> niftoaster.NifToaster().cli() # doctest: +ELLIPSIS +REPORT_NDIFF
pyffi.toaster:INFO:=== tests/spells/nif/files/test_fix_texturepath.nif ===
pyffi.toaster:INFO:  --- fix_texturepath ---
pyffi.toaster:INFO:    ~~~ NiNode [Scene Root] ~~~
pyffi.toaster:INFO:      ~~~ NiTriStrips [Sphere] ~~~
pyffi.toaster:INFO:        ~~~ NiTexturingProperty [] ~~~
pyffi.toaster:INFO:          ~~~ NiSourceTexture [] ~~~
pyffi.toaster:INFO:            fixed file name 'path\test1.dds'
pyffi.toaster:INFO:          ~~~ NiSourceTexture [] ~~~
pyffi.toaster:INFO:            fixed file name 'an\other\path\also\backslashes\test2.dds'
pyffi.toaster:INFO:          ~~~ NiSourceTexture [] ~~~
pyffi.toaster:INFO:          ~~~ NiSourceTexture [] ~~~
pyffi.toaster:INFO:            fixed file name 'evil\rants\IS\not\good\no\no\test4.dds'
pyffi.toaster:INFO:          ~~~ NiSourceTexture [] ~~~
pyffi.toaster:INFO:          ~~~ NiSourceTexture [] ~~~
pyffi.toaster:INFO:            fixed file name 'doubleslash\test6.dds'
pyffi.toaster:INFO:  writing to temporary file
pyffi.toaster:INFO:Finished.

