From 1d67b863ede194b915a99240ca82e2e67b9d3dcb Mon Sep 17 00:00:00 2001 From: Han-Wen Nienhuys Date: Fri, 26 Jan 2007 16:03:46 +0100 Subject: [PATCH] coverage fixes. --- buildscripts/coverage.py | 2 +- input/regression/markup-commands.ly | 34 +++++++++++++++++++++++++++++ input/regression/skip-of-length.ly | 25 +++++++++++++++++++++ lily/bar-number-engraver.cc | 2 -- scm/framework-ps.scm | 14 ++++++------ scm/lily-library.scm | 11 ++-------- scm/output-ps.scm | 3 --- 7 files changed, 69 insertions(+), 22 deletions(-) create mode 100644 input/regression/markup-commands.ly create mode 100644 input/regression/skip-of-length.ly diff --git a/buildscripts/coverage.py b/buildscripts/coverage.py index 68428decd4..ed7d0eef25 100644 --- a/buildscripts/coverage.py +++ b/buildscripts/coverage.py @@ -231,7 +231,7 @@ def main (): if options.uncovered: chunks = filter_uncovered (chunks) - chunks = [(c.uncovered_score (), c) for c in chunks] + chunks = [(c.uncovered_score (), c) for c in chunks if c.uncovered_score() > 0] elif options.hotspots: chunks = [((c.coverage_count, -c.length()), c) for c in chunks] diff --git a/input/regression/markup-commands.ly b/input/regression/markup-commands.ly new file mode 100644 index 0000000000..3e6a211fe9 --- /dev/null +++ b/input/regression/markup-commands.ly @@ -0,0 +1,34 @@ +\header +{ + + texidoc = "test various markup commands." + +} +\paper { ragged-right = ##T } +\version "2.11.13" + +{ + g'_\markup { + \column { + \line { + foo \magnify #2 foo + LOWER \lower #3 LOWER + \large \bold { normal \normal-text normal } + } + + \override #'(line-width . 50) + \override #'(bla . "This is a field containing text. Blah blah +blah. This is a field containing text. Blah blah blah. This is a +field containing text. Blah blah blah. This is a field containing +text. Blah blah blah. This is a field containing text. Blah blah +blah.") + \column { + justify: + \justify-field #'bla + wordwrap: + \wordwrap-field #'bla + } + + } + } +} diff --git a/input/regression/skip-of-length.ly b/input/regression/skip-of-length.ly new file mode 100644 index 0000000000..e80bede98c --- /dev/null +++ b/input/regression/skip-of-length.ly @@ -0,0 +1,25 @@ +\header { + texidoc = "skip-of-length and mmrest-of-length create skips and rests that +last as long as their arguments." + +} +\paper { + ragged-right = ##T +} + +\version "2.11.13" + +\relative +<< + \new Staff { + c\breve f4 r2. + c\breve f4 r2. + s\breve^"skip" + } + \new Staff { + \applyMusic #skip-of-length { c\breve } f4 r2. + \applyMusic #mmrest-of-length { c\breve } f4 r2. + \displayMusic \musicMap #skip->rest s\breve + } +>> + diff --git a/lily/bar-number-engraver.cc b/lily/bar-number-engraver.cc index f53cfd6f26..ecc83ac756 100644 --- a/lily/bar-number-engraver.cc +++ b/lily/bar-number-engraver.cc @@ -36,8 +36,6 @@ protected: void Bar_number_engraver::process_music () { - // todo include (&&!time->cadenza_b_) - SCM wb = get_property ("whichBar"); if (scm_is_string (wb)) diff --git a/scm/framework-ps.scm b/scm/framework-ps.scm index 213d995c2c..a277acb741 100644 --- a/scm/framework-ps.scm +++ b/scm/framework-ps.scm @@ -164,13 +164,13 @@ (ly:output-def-lookup paper 'output-scale)) (ly:bp 1))) (landscape? (eq? (ly:output-def-lookup paper 'landscape) #t))) - (format "%%DocumentMedia: ~a ~a ~a ~a ~a ~a\n" - (ly:output-def-lookup paper 'papersizename) - (round2 (if landscape? h w)) - (round2 (if landscape? w h)) - 80 ;; weight - "()" ;; color - "()" ;; type + (ly:format "%%DocumentMedia: ~a ~2f ~2f ~a ~a ~a\n" + (ly:output-def-lookup paper 'papersizename) + (if landscape? h w) + (if landscape? w h) + 80 ;; weight + "()" ;; color + "()" ;; type ))) diff --git a/scm/lily-library.scm b/scm/lily-library.scm index 8cc699c254..e6215b9823 100644 --- a/scm/lily-library.scm +++ b/scm/lily-library.scm @@ -436,9 +436,6 @@ found." (make-string 1 (integer->char (+ 65 (modulo i 26)))) (string-encode-integer (quotient i 26)))))) -(define-public (ly:numbers->string lst) - (string-join (map ly:number->string lst) " ")) - (define (number->octal-string x) (let* ((n (inexact->exact x)) (n64 (quotient n 64)) @@ -518,13 +515,9 @@ possibly turned off." 0 (if (< x 0) -1 1))) -(define-public (round2 num) - (/ (round (* 100 num)) 100)) - -(define-public (round4 num) - (/ (round (* 10000 num)) 10000)) -(define-public (car< a b) (< (car a) (car b))) +(define-public (car< a b) + (< (car a) (car b))) (define-public (symbolstring lst) (symbol->string r))) diff --git a/scm/output-ps.scm b/scm/output-ps.scm index b82c185e02..1a136ba772 100644 --- a/scm/output-ps.scm +++ b/scm/output-ps.scm @@ -67,9 +67,6 @@ (define (number-pair->string4 numpair) (ly:format "~4l" numpair)) -(define (numbers->string4 numlist) - (string-join (map str4 numlist) " ")) - ;;; ;;; Lily output interface, PostScript implementation --- cleanup and docme ;;; -- 2.39.2