~ubuntu-branches/ubuntu/trusty/expect/trusty

« back to all changes in this revision

Viewing changes to fixcat

  • Committer: Bazaar Package Importer
  • Author(s): Sergei Golovan
  • Date: 2011-08-17 21:50:29 UTC
  • mfrom: (1.1.6 upstream)
  • Revision ID: james.westby@ubuntu.com-20110817215029-0cfarscc630tfc5v
Tags: 5.45-1
* New upstream release.
* Removed unnecessary patches.
* Removed the expectk package because expectk was dropped from the upstream
  distribution. See NEWS.Debian for possible workarounds.
* Updated package to standards version 3.9.2 (no changes needed).

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
#!expect --
2
 
# Synopsis: fixcat
3
 
# Author: Don Libes
4
 
 
5
 
# Description: test to see if /bin/cat is unbuffered (i.e., -u is needed)
6
 
# Return 0 if buffered, 1 if unbuffered.
7
 
#
8
 
# If this file is sitting in an architecture-specific library directory,
9
 
# then it serves as a marker that your /bin/cat buffers by default.
10
 
 
11
 
# test for when catting to/from files
12
 
log_user 0
13
 
spawn -open [open "|cat" "r+"]
14
 
send "\r"
15
 
expect "\r" {exit 1}
16
 
 
17
 
# test for when catting to real tty
18
 
#log_user 0
19
 
#spawn /bin/cat
20
 
#send "\r"
21
 
#expect "\r\n\r\n" {exit 1}