t / t0205-gettext-poison.shon commit Merge branch 'master' of https://github.com/Softcatala/git-po (87af1bb)
   1#!/bin/sh
   2#
   3# Copyright (c) 2010 Ævar Arnfjörð Bjarmason
   4#
   5
   6test_description='Gettext Shell poison'
   7
   8. ./lib-gettext.sh
   9
  10test_expect_success GETTEXT_POISON 'sanity: $GIT_INTERNAL_GETTEXT_SH_SCHEME" is poison' '
  11    test "$GIT_INTERNAL_GETTEXT_SH_SCHEME" = "poison"
  12'
  13
  14test_expect_success GETTEXT_POISON 'gettext: our gettext() fallback has poison semantics' '
  15    printf "# GETTEXT POISON #" >expect &&
  16    gettext "test" >actual &&
  17    test_cmp expect actual &&
  18    printf "# GETTEXT POISON #" >expect &&
  19    gettext "test more words" >actual &&
  20    test_cmp expect actual
  21'
  22
  23test_expect_success GETTEXT_POISON 'eval_gettext: our eval_gettext() fallback has poison semantics' '
  24    printf "# GETTEXT POISON #" >expect &&
  25    eval_gettext "test" >actual &&
  26    test_cmp expect actual &&
  27    printf "# GETTEXT POISON #" >expect &&
  28    eval_gettext "test more words" >actual &&
  29    test_cmp expect actual
  30'
  31
  32test_done