From d18710ab814b8a831168ccd90774f73d50754c03 Mon Sep 17 00:00:00 2001 From: Louis Date: Wed, 28 Oct 2015 21:22:55 +0100 Subject: [PATCH] [test] Moved non breakable space tests into their own test --- test/test_compilation/subdir.tex.control | 2 +- .../subdir_datadir/songs/datadir2.sgc | 1 - test/test_compilation/unicode.sb | 4 + test/test_compilation/unicode.tex.control | 117 ++++++++++++++++++ .../unicode_datadir/songs/nonbreak.sgc | 5 + 5 files changed, 127 insertions(+), 2 deletions(-) create mode 100644 test/test_compilation/unicode.sb create mode 100644 test/test_compilation/unicode.tex.control create mode 100644 test/test_compilation/unicode_datadir/songs/nonbreak.sgc diff --git a/test/test_compilation/subdir.tex.control b/test/test_compilation/subdir.tex.control index 30dbb161..6ed84e9a 100644 --- a/test/test_compilation/subdir.tex.control +++ b/test/test_compilation/subdir.tex.control @@ -131,7 +131,7 @@ Chordpro}[ \beginsong{Image included from a different datadir\\ Chordpro}[ by={ - Author with non breaking space chars }, + }, cov={img/datadir2.png}, ] diff --git a/test/test_compilation/subdir_datadir/songs/datadir2.sgc b/test/test_compilation/subdir_datadir/songs/datadir2.sgc index 9bedf7cf..ff941a56 100644 --- a/test/test_compilation/subdir_datadir/songs/datadir2.sgc +++ b/test/test_compilation/subdir_datadir/songs/datadir2.sgc @@ -1,6 +1,5 @@ {title : Image included from a different datadir} {subtitle: Chordpro} -{by: Author with non breaking space chars} {cover: datadir2.png} {lang: en} diff --git a/test/test_compilation/unicode.sb b/test/test_compilation/unicode.sb new file mode 100644 index 00000000..fffed7cc --- /dev/null +++ b/test/test_compilation/unicode.sb @@ -0,0 +1,4 @@ +{ +"datadir": ["unicode_datadir"], +"lang": "en" +} diff --git a/test/test_compilation/unicode.tex.control b/test/test_compilation/unicode.tex.control new file mode 100644 index 00000000..cd402cdb --- /dev/null +++ b/test/test_compilation/unicode.tex.control @@ -0,0 +1,117 @@ + + + + + + +%% Automatically generated document. +%% You may edit this file but all changes will be overwritten. +%% If you want to change this document, have a look at +%% the templating system. +%% +%% Generated using Songbook + +\makeatletter +\def\input@path{ % + {/home/louis/projets/patacrep/patacrep/test/test_compilation/unicode_datadir/latex/} % + {/home/louis/projets/patacrep/patacrep/test/test_compilation/latex/} % + {/home/louis/projets/patacrep/patacrep/patacrep/data/latex/} % +} +\makeatother + +\documentclass[ + ]{article} + +\usepackage[ + chorded, +diagram, +pictures, +guitar, + ]{patacrep} + +\usepackage[utf8]{inputenc} +\usepackage[T1]{fontenc} +\usepackage{lmodern} + + +\PassOptionsToPackage{english}{babel} +\usepackage[english]{babel} +\lang{english} + +\usepackage{graphicx} +\graphicspath{ % + {/home/louis/projets/patacrep/patacrep/test/test_compilation/unicode_datadir/} % + {/home/louis/projets/patacrep/patacrep/test/test_compilation/} % + {/home/louis/projets/patacrep/patacrep/patacrep/data/} % +} + + +\makeatletter +\@ifpackageloaded{hyperref}{}{ + \usepackage{url} + \newcommand{\phantomsection}{} + \newcommand{\hyperlink}[2]{#2} + \newcommand{\href}[2]{\expandafter\url\expandafter{#1}} +} +\makeatother +\DeclareUnicodeCharacter{00A0}{~} + + +\usepackage{chords} + +\title{Guitar songbook} +\author{The Patacrep Team} + +\newindex{titleidx}{unicode_title} +\newauthorindex{authidx}{unicode_auth} + + +\notenamesout{A}{B}{C}{D}{E}{F}{G} + + +\begin{document} + +\maketitle + + +\showindex{\songindexname}{titleidx} +\showindex{\authorindexname}{authidx} + +% list of chords +\ifchorded + \ifdiagram + \phantomsection + \addcontentsline{toc}{section}{\chordlistname} + \chords + \fi +\fi + +\phantomsection +\addcontentsline{toc}{section}{\songlistname} + +\begin{songs}{titleidx,authidx} +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +%% songs/./nonbreak.sgc + +\selectlanguage{english} + +\beginsong{Song with non breakable space}[ + by={ + Author with non breaking space chars }, +] + + + + +\begin{verse} + Non break +\end{verse} + +\endsong + +\end{songs} + + + + +\end{document} \ No newline at end of file diff --git a/test/test_compilation/unicode_datadir/songs/nonbreak.sgc b/test/test_compilation/unicode_datadir/songs/nonbreak.sgc new file mode 100644 index 00000000..841d9acb --- /dev/null +++ b/test/test_compilation/unicode_datadir/songs/nonbreak.sgc @@ -0,0 +1,5 @@ +{title : Song with non breakable space} +{by: Author with non breaking space chars} +{lang: en} + +Non break