~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/tests/test_win32utils.py

  • Committer: Canonical.com Patch Queue Manager
  • Date: 2010-11-08 13:45:51 UTC
  • mfrom: (5532.1.1 trunk)
  • Revision ID: pqm@pqm.ubuntu.com-20101108134551-sxvk77ehmegkrwmm
(vila) Fix news entry

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
# Copyright (C) 2007-2011 Canonical Ltd
 
1
# Copyright (C) 2007-2010 Canonical Ltd
2
2
#
3
3
# This program is free software; you can redistribute it and/or modify
4
4
# it under the terms of the GNU General Public License as published by
17
17
"""Tests for win32utils."""
18
18
 
19
19
import os
 
20
import sys
20
21
 
21
22
from bzrlib import (
22
23
    osutils,
119
120
            ])
120
121
 
121
122
    def test_case_insensitive_globbing(self):
122
 
        if os.path.normcase("AbC") == "AbC":
123
 
            self.skip("Test requires case insensitive globbing function")
 
123
        self.requireFeature(tests.CaseInsCasePresFilenameFeature)
124
124
        self.build_ascii_tree()
125
125
        self._run_testset([
126
126
            [[u'A'], [u'A']],
216
216
    def test_appdata_not_using_environment(self):
217
217
        # Test that we aren't falling back to the environment
218
218
        first = win32utils.get_appdata_location()
219
 
        self.overrideEnv("APPDATA", None)
 
219
        self._captureVar("APPDATA", None)
220
220
        self.assertPathsEqual(first, win32utils.get_appdata_location())
221
221
 
222
222
    def test_appdata_matches_environment(self):
233
233
    def test_local_appdata_not_using_environment(self):
234
234
        # Test that we aren't falling back to the environment
235
235
        first = win32utils.get_local_appdata_location()
236
 
        self.overrideEnv("LOCALAPPDATA", None)
 
236
        self._captureVar("LOCALAPPDATA", None)
237
237
        self.assertPathsEqual(first, win32utils.get_local_appdata_location())
238
238
 
239
239
    def test_local_appdata_matches_environment(self):
326
326
            single_quotes_allowed=True)
327
327
 
328
328
    def test_case_insensitive_globs(self):
329
 
        if os.path.normcase("AbC") == "AbC":
330
 
            self.skip("Test requires case insensitive globbing function")
 
329
        self.requireFeature(tests.CaseInsCasePresFilenameFeature)
331
330
        self.build_tree(['a/', 'a/b.c', 'a/c.c', 'a/c.h'])
332
331
        self.assertCommandLine([u'A/b.c'], 'A/B*')
333
332