~ubuntu-branches/ubuntu/utopic/coreutils/utopic-proposed

« back to all changes in this revision

Viewing changes to gnulib-tests/test-lseek.c

  • Committer: Package Import Robot
  • Author(s): Colin Watson
  • Date: 2012-11-28 03:03:42 UTC
  • mfrom: (8.3.4 sid)
  • Revision ID: package-import@ubuntu.com-20121128030342-21zanj8354gas5gr
Tags: 8.20-3ubuntu1
* Resynchronise with Debian.  Remaining changes:
  - Make 'uname -i -p' return the real processor/hardware, instead of
    unknown.
  - Build-depend on gettext:any instead of on gettext, so that apt-get can
    properly resolve build-dependencies on the tool when cross-building.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
/* -*- buffer-read-only: t -*- vi: set ro: */
2
 
/* DO NOT EDIT! GENERATED AUTOMATICALLY! */
3
1
/* Test of lseek() function.
4
 
   Copyright (C) 2007-2011 Free Software Foundation, Inc.
 
2
   Copyright (C) 2007-2012 Free Software Foundation, Inc.
5
3
 
6
4
   This program is free software: you can redistribute it and/or modify
7
5
   it under the terms of the GNU General Public License as published by
83
81
         invoking shell are not enough on HP-UX.  */
84
82
      close (0);
85
83
      close (1);
 
84
 
86
85
      errno = 0;
87
86
      ASSERT (lseek (0, (off_t)0, SEEK_CUR) == -1);
88
87
      ASSERT (errno == EBADF);
 
88
 
89
89
      errno = 0;
90
90
      ASSERT (lseek (1, (off_t)0, SEEK_CUR) == -1);
91
91
      ASSERT (errno == EBADF);
 
92
 
 
93
      /* Test behaviour for invalid file descriptors.  */
 
94
      errno = 0;
 
95
      ASSERT (lseek (-1, (off_t)0, SEEK_CUR) == -1);
 
96
      ASSERT (errno == EBADF);
 
97
 
 
98
      errno = 0;
 
99
      ASSERT (lseek (99, (off_t)0, SEEK_CUR) == -1);
 
100
      ASSERT (errno == EBADF);
 
101
 
92
102
      break;
93
103
 
94
104
    default: