-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
5 changed files
with
87 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
#!/usr/bin/env bash | ||
export GUILE_AUTO_COMPILE=0 | ||
|
||
eval "$(../src/scribbu -L ${srcdir}/../scheme -s ${srcdir}/test-display.scm ${srcdir} \ | ||
2> >(t_err=$(cat); typeset -p t_err) \ | ||
> >(t_std=$(cat); typeset -p t_std) )" | ||
t_stat=$? | ||
# echo "$t_std" | ||
t_err=$(echo "$t_err" | grep -vE ';;; note: source file .*test-display.scm' | grep -v ';;; note: source file .*scribbu.scm' | grep -v 'newer than compiled') | ||
if [ ! -z "$t_err" ]; then | ||
printf '=%.0s' $(seq 1 $cols) | ||
echo "$t_err" | ||
printf '=%.0s' $(seq 1 $cols) | ||
exit 1 | ||
fi | ||
|
||
output=$(echo $t_std|tr \\n :) | ||
if [ "$output" != "<id3v1-tag Sinead O'Connor - Easter Rebellion (Performed by> <id3v2-tag The Pogues - Lorca's Novena (335921 bytes padding)>:" ]; then | ||
echo $output | ||
exit 1 | ||
fi | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
;;;; test-display.scm | ||
;;;; | ||
;;;; Copyright (C) 2023 Michael Herstine <sp1ff@pobox.com> | ||
;;;; | ||
;;;; This file is part of scribbu. | ||
;;;; | ||
;;;; scribbu is free software: you can redistribute it and/or modify | ||
;;;; it under the terms of the GNU General Public License as published by | ||
;;;; the Free Software Foundation, either version 3 of the License, or | ||
;;;; (at your option) any later version. | ||
;;;; | ||
;;;; scribbu is distributed in the hope that it will be useful, | ||
;;;; but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
;;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
;;;; GNU General Public License for more details. | ||
;;;; | ||
;;;; You should have received a copy of the GNU General Public License | ||
;;;; along with scribbu. If not, see <http://www.gnu.org/licenses/>.;;;; | ||
;;;; | ||
;;;; | ||
|
||
|
||
(use-modules (scribbu)) | ||
(use-modules (oop goops)) | ||
|
||
(setlocale LC_ALL "en_US.UTF-8") | ||
|
||
|
||
(define (main srcdir) | ||
"Exercise pretty-printing tags." | ||
(let ((tag (read-id3v1-tag (format #f "~a/data/elliot-goldenthal.id3v1.tag" srcdir)))) | ||
(format (current-output-port) "~a\n" tag)) | ||
(let ((tag (caar (read-tagset (format #f "~a/data/lorca.mp3" srcdir))))) | ||
(format (current-output-port) "~a\n" tag))) | ||
|
||
|
||
(let ((cl (cdr (command-line)))) | ||
(if (= 1 (length cl)) | ||
(main (car cl)) | ||
(begin | ||
(format #t "Usage: test-display.scm ${srcdir}\n") | ||
(exit 2)))) |