File: examples

package info (click to toggle)
libgnatcoll 1.6gpl2014-6
  • links: PTS, VCS
  • area: main
  • in suites: jessie, jessie-kfreebsd
  • size: 22,760 kB
  • ctags: 10,162
  • sloc: ada: 132,013; ansic: 94,291; python: 3,762; sh: 2,781; cpp: 1,394; makefile: 342; xml: 31; sql: 6
file content (30 lines) | stat: -rw-r--r-- 612 bytes parent folder | download
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
#!/bin/sh
set -C -e -f -u

# Test the -doc package instead of copying the source tree directly.
cp -r /usr/share/doc/libgnatcoll-doc/examples "$ADTTMP"
cd "$ADTTMP/examples"

gnatmake -q -P gmp/gmp_examples.gpr
gmp/isprime > result1 <<EOF
7
6

EOF
diff result1 - <<EOF
Enter candidate number (return to quit): 7 is a prime
Enter candidate number (return to quit): 6 is not a prime
Enter candidate number (return to quit): 
EOF

gnatmake -q -P examples.gpr
(./newclass; echo) > result2 <<EOF
print ('hello')
EOF
diff result2 - <<EOF
Please type python commands:
>>> hello
>>> 
EOF

gnatmake -q -P examplesgtk.gpr