#!/usr/bin/env bash --login 

# we use pattern matching here because sometimes a locale that bzr doesn't
# understand can cause it to emit a lot of warnings along with the actual
# output we want to test.  Also, the "-all" parameter prevents bzr from trying
# to expand variables that don't have values when invoked from bzr config

[[ `bzr alias diff` =~ 'bzr alias diff="diff --using=ksdiff"' ]] &&
[[ `bzr config bzr.default_mergetool --scope=bazaar` =~ 'Kaleidoscope' ]] &&
[[ `bzr config --all bzr.mergetool.Kaleidoscope --scope=bazaar` =~ 'ksdiff --merge --output "{result}" --base "{base}" -- "{this}" "{other}"' ]]