summaryrefslogtreecommitdiffabout
path: root/tests/script02.at
blob: 0985f35c42df1796c7a073bbea6ff73193024d4d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
# This file is part of idest  -*- autotest -*-
# Copyright (C) 2011, 2015 Sergey Poznyakoff
#
# Idest 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, or (at your option)
# any later version.
#
# Idest 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 idest.  If not, see <http://www.gnu.org/licenses/>.

AT_SETUP([basic scripting: startup files])
AT_KEYWORDS([script startup script02])

AT_DATA([framelist.scm],[
(define (idest-main name frames)
  (display name)
  (newline)
  (for-each
   (lambda (frame)
     (display frame)
     (newline))
   frames))
])

AT_DATA([.idest.scm],[
(display "Startup file .idest.scm loaded")
(newline)
(for-each
 (lambda (dir)
   (display dir)
   (newline))
 (command-line))
])

AT_CHECK([
WITH_GUILE([
genfile -f file1 -s $abs_srcdir/id3v1 10k
HOME=/tmp idest -S ./framelist.scm file1 | sed '4s|.*/idest/idest.scm|GUILE_SITE_DIR/idest/idest.scm|'])
],
[0],
[Startup file .idest.scm loaded
.idest.scm
/tmp/.idest.scm
GUILE_SITE_DIR/idest/idest.scm
file1
(TIT2 (descr . Title/songname/content description) (text . File))
(TPE1 (descr . Lead performer(s)/soloist(s)) (text . Sergey Poznyakoff))
(TALB (descr . Album/movie/show title) (text . Idest Test Suite))
(TDRC (descr . Recording time) (text . 2011))
(TRCK (descr . Track number/position in set) (text . 1))
(TCON (descr . Content type) (text . Other))
(COMM (descr . Comments) (text . Sample ID3 headers for idest) (lang . XXX) (condesc . ))
])

AT_CLEANUP

Return to:

Send suggestions and report system problems to the System administrator.